libvirt init script improvements
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=70
This commit is contained in:
parent
62ed64d762
commit
b9fd13f91e
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 13 17:44:27 MDT 2010 - jfehlig@novell.com
|
||||
|
||||
- cannot restart dead libvirtd without manually removing pidfile
|
||||
modified libvirtd.init
|
||||
bnc#645755
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 11 19:04:21 UTC 2010 - cristian.rodriguez@opensuse.org
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
|
||||
LIBVIRTD_BIN=/usr/sbin/libvirtd
|
||||
LIBVIRTD_PIDFILE=/var/run/libvirtd.pid
|
||||
test -x $LIBVIRTD_BIN || { echo "$LIBVIRD_BIN not installed";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 5; fi; }
|
||||
@ -30,6 +31,16 @@ rc_reset
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -e $LIBVIRTD_PIDFILE ]; then
|
||||
if checkproc $LIBVIRTD_BIN ; then
|
||||
echo -n "libvirtd is already running."
|
||||
rc_status -v
|
||||
exit
|
||||
else
|
||||
echo "Removing stale PID file $LIBVIRTD_PIDFILE."
|
||||
rm -f $LIBVIRTD_PIDFILE
|
||||
fi
|
||||
fi
|
||||
echo -n "Starting libvirtd "
|
||||
startproc $LIBVIRTD_BIN -d -l
|
||||
rc_status -v
|
||||
@ -37,6 +48,7 @@ case "$1" in
|
||||
stop)
|
||||
echo -n "Shutting down libvirtd "
|
||||
killproc -TERM $LIBVIRTD_BIN > /dev/null 2>&1
|
||||
rm -f $LIBVIRTD_PIDFILE
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart)
|
||||
|
Loading…
Reference in New Issue
Block a user