[Pkg-xen-changes] r986 - trunk/xen/debian
Bastian Blank
waldi at alioth.debian.org
Sun Apr 22 19:28:06 UTC 2012
Author: waldi
Date: Sun Apr 22 19:28:06 2012
New Revision: 986
Log:
debian/xen-utils-common.xendomains.init: Remove non-Debian support.
Modified:
trunk/xen/debian/xen-utils-common.xendomains.init
Modified: trunk/xen/debian/xen-utils-common.xendomains.init
==============================================================================
--- trunk/xen/debian/xen-utils-common.xendomains.init Sun Apr 22 19:21:25 2012 (r985)
+++ trunk/xen/debian/xen-utils-common.xendomains.init Sun Apr 22 19:28:06 2012 (r986)
@@ -10,6 +10,9 @@
# boots / shuts down.
### END INIT INFO
+. /lib/init/vars.sh
+. /lib/lsb/init-functions
+
xen list &> /dev/null
if test $? -ne 0
then
@@ -22,18 +25,8 @@
exit 0
fi
-# See docs/misc/distro_mapping.txt
-if [ -d /var/lock/subsys ]; then
- LOCKFILE=/var/lock/subsys/xendomains
-else
- LOCKFILE=/var/lock/xendomains
-fi
-
-if [ -d /etc/sysconfig ]; then
- XENDOM_CONFIG=/etc/sysconfig/xendomains
-else
- XENDOM_CONFIG=/etc/default/xendomains
-fi
+LOCKFILE=/var/lock/xendomains
+XENDOM_CONFIG=/etc/default/xendomains
test -r $XENDOM_CONFIG || { echo "$XENDOM_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
@@ -41,42 +34,6 @@
. $XENDOM_CONFIG
-# Use the SUSE rc_ init script functions;
-# emulate them on LSB, RH and other systems
-if test -e /etc/rc.status; then
- # SUSE rc script library
- . /etc/rc.status
-else
- _cmd=$1
- declare -a _SMSG
- if test "${_cmd}" = "status"; then
- _SMSG=(running dead dead unused unknown)
- _RC_UNUSED=3
- else
- _SMSG=(done failed failed missed failed skipped unused failed failed)
- _RC_UNUSED=6
- fi
- if test -e /etc/init.d/functions; then
- # REDHAT
- . /etc/init.d/functions
- echo_rc()
- {
- #echo -n " [${_SMSG[${_RC_RV}]}] "
- if test ${_RC_RV} = 0; then
- success " [${_SMSG[${_RC_RV}]}] "
- else
- failure " [${_SMSG[${_RC_RV}]}] "
- fi
- }
- elif test -e /lib/lsb/init-functions; then
- # LSB
- . /lib/lsb/init-functions
- if alias log_success_msg >/dev/null 2>/dev/null; then
- echo_rc()
- {
- echo " [${_SMSG[${_RC_RV}]}] "
- }
- else
echo_rc()
{
if test ${_RC_RV} = 0; then
@@ -85,14 +42,7 @@
log_failure_msg " [${_SMSG[${_RC_RV}]}] "
fi
}
- fi
- else
- # emulate it
- echo_rc()
- {
- echo " [${_SMSG[${_RC_RV}]}] "
- }
- fi
+
rc_reset() { _RC_RV=0; }
rc_failed()
{
@@ -124,7 +74,6 @@
if test -e /etc/init.d/S[0-9][0-9]${1}; then return 0; fi
return 1
}
-fi
if ! which usleep >&/dev/null
then
More information about the Pkg-xen-changes
mailing list