Changeset 2888 in MondoRescue for branches/2.2.9/mindi/rootfs/sbin/init
- Timestamp:
- Oct 11, 2011, 6:56:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi/rootfs/sbin/init
r2885 r2888 9 9 CaughtSoftReset() { 10 10 trap SIGTERM 11 reboot -f 11 # Now kill all processes 12 kill -TERM -1 13 sync 14 sleep 1 15 kill -KILL -1 16 sync 17 # Try to umount what we can again 18 umount -a -d -r 2> /dev/null 19 # now reboot hard 20 # This doesn't work nor does reboot 21 # ctrlaltdel hard & 22 # reboot -f 23 echo s > /proc/sysrq-trigger 24 echo u > /proc/sysrq-trigger 25 echo b > /proc/sysrq-trigger 26 # That script should never end 27 while [ "1" == "1" ]; do 28 sleep 10 29 done 12 30 } 13 31 … … 47 65 48 66 67 GetShell() { 68 echo -en "Type 'exit' to reboot the PC\n" 69 umount -d /mnt/cdrom 2> /dev/null 70 mount / -o rw,remount > /dev/null 2> /dev/null 71 LogIt "Launching Shell" 72 setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1' 73 } 74 49 75 50 76 Die() { 51 77 LogIt "Fatal error! $1" 1 52 exit 1 53 } 54 78 GetShell 79 } 55 80 56 81 … … 698 723 ExtractDataDisksAndLoadModules() { 699 724 LogIt "Installing additional tools ..." 1 725 # BCO: test return value 700 726 install-additional-tools 701 727 # Keep the kernel silent again … … 717 743 MINDI_REV=PBREV 718 744 trap CaughtSoftReset SIGTERM 745 trap GetShell SIGINTR 719 746 LOGFILE=/var/log/mondorestore.log 720 747 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/mondo:/usr/games … … 963 990 sleep 1 964 991 else 965 echo -en "Type 'exit' to reboot the PC\n" 966 umount -d /mnt/cdrom 2> /dev/null 967 mount / -o rw,remount > /dev/null 2> /dev/null 968 LogIt "Launching Shell" 969 sh 992 GetShell 970 993 fi 971 994 CaughtSoftReset 972 # reboot
Note:
See TracChangeset
for help on using the changeset viewer.