Bug#712023: initscripts: wait for child to exit during shutdown/reboot

Pierre Ynard linkfanel at yahoo.fr
Sat Mar 9 21:31:24 GMT 2019


tags 712023 moreinfo
thanks

> I have made a script to readout the vm's that are running and save
> there state one by one. This takes some time. At the beginning no vm
> was saved right. I did some tunning with the scripts and have now 5-10
> sec's before the other vboxservices are terminated. So i can bring 3
> maybe 4 syetems the rightway down.
>
> I did look in the documentation, and i didnot found a usefull option ,
> that could ensure me that the vm is brought down the rightway. (wait
> for child to terminated)

I'm not sure I understand correctly. Does your script run outside the
VMs to list and save them one by one, or does it run inside each VM?
What does it do? How do you launch your script? What terminates the VMs
in the wrong way? What would be the right way?

> I am looking for a manner that the system will wait for the proces to
> terminated and not be killed. Because killing running vm's might lead
> top dataloss.

You can write an init script to save and stop your VMs waiting all the
time it takes, and set proper dependencies for that init script to
ensure the shutdown sequence waits for it to have completed, with all
your VMs properly saved, before all remaining processes on the system
are killed. Is there any reason why that wouldn't work in your case?

> I'm thinking about some tag in the initscripts - to place if a proces
> has to be waited for. Maybe with the possibillity to set a maxtime,
> so it is guaranted that the machine will not hang for waiting on a
> process that will not terminated.

Considering that you should be able to do this in the way I mentioned
above, I don't think it's necessary to add such a mechanism - but maybe
I misunderstood your problem.

-- 
Pierre Ynard




More information about the Debian-init-diversity mailing list