Bug#587678: multipath-tools: check for multipathd process before start
Ritesh Raj Sarraf
rrs at researchut.com
Wed Jun 30 20:02:24 UTC 2010
Package: multipath-tools
Version: 0.4.8+git0.761c66f-9
Severity: normal
Tags: patch
On upgrade, multipathd start can fail if it is already running.
The initscript does not do any checks for that.
Attached patch takes care of it.
--- /etc/init.d/multipath-tools 2010-04-11 16:54:28.000000000 +0530
+++ /tmp/multipath-tools 2010-07-01 01:24:03.442285462 +0530
@@ -28,6 +28,10 @@
case "$1" in
start)
+ if [ `pidof $NAME` ]; then
+ log_daemon_msg "$NAME already running"
+ exit 0;
+ fi
log_daemon_msg "Starting $DESC" "$NAME"
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
log_end_msg $?
-- Package-specific info:
/etc/multipath.conf does not exist.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.34-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages multipath-tools depends on:
ii initscripts 2.88dsf-9 scripts for initializing and shutt
ii kpartx 0.4.8+git0.761c66f-9 create device mappings for partiti
ii libaio1 0.3.107-7 Linux kernel AIO access library -
ii libc6 2.11.1-3 Embedded GNU C Library: Shared lib
ii libdevmapper1.02.1 2:1.02.48-2 The Linux Kernel Device Mapper use
ii libncurses5 5.7+20100313-2 shared libraries for terminal hand
ii libreadline6 6.1-3 GNU readline and history libraries
ii lsb-base 3.2-23.1 Linux Standard Base 3.2 init scrip
ii udev 157-1 /dev/ and hotplug management daemo
multipath-tools recommends no packages.
Versions of packages multipath-tools suggests:
pn multipath-tools-boot <none> (no description available)
-- no debconf information
-------------- next part --------------
--- /etc/init.d/multipath-tools 2010-04-11 16:54:28.000000000 +0530
+++ /tmp/multipath-tools 2010-07-01 01:24:03.442285462 +0530
@@ -28,6 +28,10 @@
case "$1" in
start)
+ if [ `pidof $NAME` ]; then
+ log_daemon_msg "$NAME already running"
+ exit 0;
+ fi
log_daemon_msg "Starting $DESC" "$NAME"
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
log_end_msg $?
More information about the pkg-lvm-maintainers
mailing list