blob: b196c5472925fa4423163dbf9e23ff0bf6d8a31f [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
RemainAfterExit=on
[Install]
WantedBy=sysinit.target