Группа :: Система/Основа
Пакет: startup
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: startup-halt.patch
--- rc.d/init.d/halt.orig 2004-03-05 02:28:34 +1200
+++ rc.d/init.d/halt 2005-07-18 00:58:19 +1300
@@ -102,6 +102,14 @@
"Unmounting filesystem" \
"Unmounting filesystem (retry)"
+# Turn off LVM
+VGCHANGE=/sbin/vgchange
+if [ -x "$VGCHANGE" -a -s /etc/lvmtab ]; then
+ if [ -e /proc/lvm ]; then
+ action "Turn off LVM:" "$VGCHANGE" -a n
+ fi
+fi
+
# Turn off raid.
RAIDSTOP=/sbin/raidstop
if [ -x "$RAIDSTOP" -a -f /etc/raidtab ]; then
@@ -109,11 +117,14 @@
# devices listed in the default config file which is not always
# the case. So we look only for the active raid devices
if [ -f /proc/mdstat ] ; then
+ rootmd=$(cat /etc/fstab|awk '$2=="/" {print $1}'|sed 's|/dev/||')
mddevs=$(grep ^md /proc/mdstat | awk '{ print $1 }')
for mddev in $mddevs ; do
+ if [ $mddev != $rootmd ] ; then
action "Turning off RAID for $mddev:" "$RAIDSTOP" "/dev/$mddev"
+ fi
done
- unset mddev mddevs
+ unset mddev mddevs rootmd
fi
#action "Turning off RAID:" /sbin/raidstop -a
fi
@@ -155,3 +166,6 @@
# Now halt or reboot.
echo "$message"
$command -i -d
+
+
+###