summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-19 12:21:56 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-19 12:21:56 +0000
commit5dca68385f218b8ec3f7350fb65770b1f75f9a58 (patch)
treeefb36fadb44e469687f0e892aa303422d4d6b334 /perl-install
parent4d2ddb4244101e775aa6afbe37c4ed67818ab79d (diff)
downloaddrakx-backup-do-not-use-5dca68385f218b8ec3f7350fb65770b1f75f9a58.tar
drakx-backup-do-not-use-5dca68385f218b8ec3f7350fb65770b1f75f9a58.tar.gz
drakx-backup-do-not-use-5dca68385f218b8ec3f7350fb65770b1f75f9a58.tar.bz2
drakx-backup-do-not-use-5dca68385f218b8ec3f7350fb65770b1f75f9a58.tar.xz
drakx-backup-do-not-use-5dca68385f218b8ec3f7350fb65770b1f75f9a58.zip
(ask_from_listf_no_check): fix fix
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/interactive.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index db5c61c03..245e6fdae 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -141,7 +141,7 @@ sub ask_from_listf_no_check {
if_($l->[1], cancel => may_apply($f, $l->[1]), focus_cancel => $def eq $l->[1]) }, []
) ? $l->[0] : $l->[1];
};
- ($@ ? $@ =~ /^wizcancel/ : die) : ($@ ? die : $ret);
+ $@ ? $@ =~ /^wizcancel/ : ($@ ? die : $ret);
} else {
ask_from_entries_refH($o, $title, $message, [ { val => \$def, type => 'list', list => $l, help => $help, format => $f } ]) && $def;
}
; then case "$1" in *start) ;; *) echo $"Usage: (halt|reboot) {start}" exit 1 ;; esac fi # Kill all processes. [ "${BASH+bash}" = bash ] && enable kill runcmd $"Sending all processes the TERM signal..." /sbin/killall5 -15 sleep 5 runcmd $"Sending all processes the KILL signal..." /sbin/killall5 -9 # Write to wtmp file before unmounting /var halt -w # Save mixer settings, here for lack of a better place. grep -q "\(sparcaudio\|sound\)" /proc/devices if [ $? = 0 -a -x /bin/aumix-minimal ]; then runcmd $"Saving mixer settings" /bin/aumix-minimal -f /etc/.aumixrc -S fi # Sync the system clock. ARC=0 SRM=0 UTC=0 if [ -f /etc/sysconfig/clock ]; then . /etc/sysconfig/clock # convert old style clock config to new values if [ "${CLOCKMODE}" = "GMT" ]; then UTC=true elif [ "${CLOCKMODE}" = "ARC" ]; then ARC=true fi fi CLOCKDEF="" CLOCKFLAGS="$CLOCKFLAGS --systohc" case "$UTC" in yes|true) CLOCKFLAGS="$CLOCKFLAGS -u"; CLOCKDEF="$CLOCKDEF (utc)"; ;; no|false) CLOCKFLAGS="$CLOCKFLAGS --localtime"; CLOCKDEF="$CLOCKDEF (localtime)"; ;; esac case "$ARC" in yes|true) CLOCKFLAGS="$CLOCKFLAGS -A"; CLOCKDEF="$CLOCKDEF (arc)"; ;; esac case "$SRM" in yes|true) CLOCKFLAGS="$CLOCKFLAGS -S"; CLOCKDEF="$CLOCKDEF (srm)"; ;; esac runcmd $"Syncing hardware clock to system time" /sbin/hwclock $CLOCKFLAGS # Turn off swap, then unmount file systems. SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps` [ -n "$SWAPS" ] && runcmd $"Turning off swap: " swapoff $SWAPS [ -x /sbin/accton ] && runcmd $"Turning off accounting: " /sbin/accton [ -x /sbin/quotaoff ] && runcmd $"Turning off quotas: " /sbin/quotaoff -a # Unmount file systems, killing processes if we have to. # Unmount loopback stuff first remaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts` [ -n "$remaining" ] && { sig= retry=3 while [ -n "$remaining" -a "$retry" -gt 0 ] do if [ "$retry" -lt 3 ]; then runcmd $"Unmounting loopback filesystems (retry):" umount $remaining else runcmd $"Unmounting loopback filesystems: " umount $remaining fi for dev in $remaining ; do losetup $dev > /dev/null 2>&1 && \ runcmd $"Detaching loopback device $dev: " losetup -d $device done remaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts` [ -z "$remaining" ] && break /sbin/fuser -k -m $sig $remaining >/dev/null sleep 5 retry=$(($retry -1)) sig=-9 done } sig= retry=3 remaining=`halt_get_remaining | sort -r` while [ -n "$remaining" -a "$retry" -gt 0 ] do if [ "$retry" -lt 3 ]; then LANG=C runcmd $"Unmounting file systems (retry): " umount -f $remaining else LANG=C runcmd $"Unmounting file systems: " umount -f $remaining fi sleep 2 remaining=`halt_get_remaining | sort -r` [ -z "$remaining" ] && break /sbin/fuser -k -m $sig $remaining >/dev/null sleep 5 retry=$(($retry-1)) sig=-9 done [ -f /proc/bus/usb/devices ] && umount /proc/bus/usb # Try them all, one last time. umount -a -f # remove the crash indicator flag rm -f /.autofsck # Remount read only anything that's left mounted. #echo $"Remounting remaining filesystems (if any) readonly" mount | awk '/( \/ |^\/dev\/root)/ { print $3 }' | while read line; do mount -n -o ro,remount $line done # Now halt or reboot. echo $"$message" if [ -f /fastboot ]; then echo $"On the next boot fsck will be skipped." elif [ -f /forcefsck ]; then echo $"On the next boot fsck will be forced." fi HALTARGS="-i -d" if [ -f /poweroff -o ! -f /halt ]; then HALTARGS="$HALTARGS -p" fi if [ "$command" = halt ] ; then if [ -r /etc/ups/upsmon.conf -a -f /etc/killpower -a -f /etc/sysconfig/ups ] ; then . /etc/sysconfig/ups [ "$SERVER" = "yes" -a "$MODEL" != "NONE" -a -n "$MODEL" -a -n "$DEVICE" ] && $MODEL -k $DEVICE fi fi eval $command $HALTARGS