blob: 856220d1da32939fa2cc03ca6282259a0eea46c1 [file] [log] [blame] [raw]
[Unit]
Description=Disallow dropping I/O caches
DefaultDependencies=off
Conflicts=shutdown.target
After=systemd-modules-load.service systemd-sysctl.service sysctl.service
Before=shutdown.target
ConditionPathExists=/proc/sys/vm/drop_caches
[Service]
Type=oneshot
ExecStart=/bin/sh -c "mkfifo /run/$$$$ && trap 'rm -f /run/$$$$' EXIT && mount --bind /run/$$$$ /proc/sys/vm/drop_caches"
TimeoutSec=10s
[Install]
WantedBy=sysinit.target