[systemd-devel] Running a script as FIRST script before shutdown

Luca Bertoncello L.Bertoncello at queo-group.com
Thu Sep 24 00:41:04 PDT 2015


Hi Andrei,

 > Try RequiresMountsFor=/run/whatever

Not enough...
Currently I have:

[Unit]
Description=TEST - oVirt interface for managing host
After=local-fs.target network.target vdsmd.service vdsm-network.service libvirtd.service libvirt-guests.service
Wants=local-fs.target network.target vdsmd.service vdsm-network.service libvirtd.service libvirt-guests.service
RequiresMountsFor=/run

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/bin/ovirt-maintenance.sh active
ExecStop=/usr/local/bin/ovirt-maintenance.sh maintenance
KillMode=none
StandardOutput=syslog+console

[Install]
WantedBy=multi-user.target

But on Shutdown the system first stops other services and umount /run, and then call my script...
Any other suggestion?

Thanks

Mit freundlichen Grüßen

Luca Bertoncello

-- 
Besuchen Sie unsere Webauftritte:

www.queo.biz		Agentur für Markenführung und Kommunikation
www.queoflow.com	IT-Consulting und Individualsoftwareentwicklung

Luca Bertoncello
Administrator
Telefon:	+49 351 21 30 38 0
Fax:		+49 351 21 30 38 99
E-Mail:	l.bertoncello at queo-group.com

queo GmbH
Tharandter Str. 13
01159 Dresden
Sitz der Gesellschaft: Dresden
Handelsregistereintrag: Amtsgericht Dresden HRB 22352
Geschäftsführer: Rüdiger Henke, André Pinkert
USt-IdNr.: DE234220077


More information about the systemd-devel mailing list