[systemd-devel] Fwd: systemd: wait for shutdown-service to complete

Reindl Harald h.reindl at thelounge.net
Fri Dec 16 08:23:44 PST 2011



Am 16.12.2011 17:09, schrieb Lennart Poettering:
> On Fri, 16.12.11 13:41, Reindl Harald (h.reindl at thelounge.net) wrote:
> 
>> there must be some bug in Fedora 15 systemd
>> "systectl start/stop vmware-default.service" works perfectly
>>
>> but at shutdown systemd will not wait until it is finished
>> before the sysv-service "vmware-service" is terminated
>> what results in hard-powered-off guests and fschecks in most
>> guests starting the host the next time :-(
>>
>> [root at rh:~]$ cat /etc/systemd/system/vmware-default.service
>> [Unit]
>> Description=VMware-Default-Machines
>> After=vmware.service
>> [Service]
>> Type=oneshot
>> ExecStart=/bin/su -c "/scripts/vmware/vm-default-start.sh" vmware
> 
> Instead of "su" just use User=vmware...

no, because the "ExecStop" needs to be called as root
and if i change the lines in the ExecStart-Script to du "su"
vmrun refuses to work, this is the only way to get the vmx-processes
started as user "vmware" and the "ExecStop" as root because this
has to suspend also machines running with different useraccounts

>> ExecStop=/scripts/vmware/vm-suspend-all.sh
>> RemainAfterExit=yes
>> TimeoutSec=600
>> SysVStartPriority=90
> 
> This is usually not what you want...

can you please explain why?

finally i want to get "ExecStart" command called after sysv-vmware-service
at boot and "ExecStop" during shutdown without interrupt BEFORE sysv-vmware
is stopped to wake up default guests at boot time and suspend ALL running
guest ina clean state at shutdown

in which way i exactly can achieve this does not matter, it has to be 100%
stable finally to not damage guests over the long

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20111216/64128983/attachment.pgp>


More information about the systemd-devel mailing list