diff options
Diffstat (limited to 'tools/hotplug/Linux/init.d/xend')
-rwxr-xr-x | tools/hotplug/Linux/init.d/xend | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/hotplug/Linux/init.d/xend b/tools/hotplug/Linux/init.d/xend index 0f7f041f71..6168afea64 100755 --- a/tools/hotplug/Linux/init.d/xend +++ b/tools/hotplug/Linux/init.d/xend @@ -40,14 +40,20 @@ case "$1" in echo "xencommons should be started first." exit 1 fi - mkdir -p /var/lock/subsys - touch /var/lock/subsys/xend + # mkdir shouldn't be needed as most distros have this already created. Default to using subsys. + # See docs/misc/distro_mapping.txt + mkdir -p /var/lock + if [ -d /var/lock/subsys ] ; then + touch /var/lock/subsys/xend + else + touch /var/lock/xend + fi xend start await_daemons_up ;; stop) xend stop - rm -f /var/lock/subsys/xend + rm -f /var/lock/subsys/xend /var/lock/xend ;; status) xend status |