You are not logged in.

#1 2012-08-27 07:45:29

lynix
Member
From: Karlsruhe, Germany
Registered: 2008-04-23
Posts: 230

Systemd: shutdown order

Is there a counterpart to 'After=' for shutting down services in a particular order?

I wrote a unit file that shall wrap an old init-script which handles initialization and backup of some ramdisks (tmpfs):

[Unit]
Description=Persistent ramdisks
Requires=local-fs.target
After=local-fs.target

[Service]
Type=simple
RemainAfterExit=true
ExecStart=/etc/rc.d/ramdisks start
ExecStop=/etc/rc.d/ramdisks stop
	
[Install]	
WantedBy=graphical.target

Startup works fine and in the correct order, but when it comes to shutdown the 'ExecStop=' command is issued late: local filesystems are often unmounted already and my ramdisks are lost.

Any idea how to make sure the stop command gets executed before local filesystems are unmounted?


Regards,

lynix

Offline

Board footer

Powered by FluxBB