[ovs-dev] create/remove /var/lock/subsys/vswitch on initscript start/stop
Ben Pfaff
blp at nicira.com
Wed Sep 16 16:17:46 UTC 2009
Ian Campbell <Ian.Campbell at citrix.com> writes:
> A lock file in /var/lock/subsys must be created with the same name as
> the initscript in order for the stop action to be automatically called
> on runlevel change. This is true at least on Red Hat derived systems
> such as XenServer where /etc/rcS contains:
> # First, run the KILL scripts.
> for i in /etc/rc$runlevel.d/K* ; do
> check_runlevel "$i" || continue
>
> # Check if the subsystem is already up.
> subsys=${i#/etc/rc$runlevel.d/K??}
> [ -f /var/lock/subsys/$subsys -o -f /var/lock/subsys/$subsys.init ] \
> || continue
> ...
Looks good to me. Pushed to master.
More information about the dev
mailing list