@@ -72,9 +72,11 @@
stop() {
root_dev=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1; }}' /etc/mtab)
- dm_num=`dmsetup info -c --noheadings -o minor $root_dev`
- root_dm_device="dm-$dm_num"
- [ -d $syspath/$root_dm_device ] && teardown_slaves $syspath/$root_dm_device
+ dm_num=`dmsetup info -c --noheadings -o minor $root_dev 2> /dev/null`
+ if [ $? -eq 0 ]; then
+ root_dm_device="dm-$dm_num"
+ [ -d $syspath/$root_dm_device ] && teardown_slaves $syspath/$root_dm_device
+ fi
echo -n $"Stopping $prog daemon: "
killproc $DAEMON