Ignore:
Timestamp:
Oct 18, 2011, 12:09:41 PM (8 years ago)
Author:
bruno
Message:
  • Fix #499 for good, by using a real init from busybox and moving our init script to etc/init.d/rcS. We also now call the reboot from busybox to exit, which indeed reset the system correctly (in a VM at least which wasn't the case before). Reauires a new mindi-busybox as well.
Location:
branches/2.2.9/mindi/rootfs/etc/init.d
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/rootfs/etc/init.d/rcS

    r2892 r2893  
    99CaughtSoftReset() {
    1010    trap SIGTERM
    11     # Now kill all processes
    12     LogIt "Killing all processes"
    13     kill -TERM -1
    14     sync
    15     sleep 1
    16     kill -KILL -1
    17     sync
    18     # Try to umount what we can again
    19     LogIt "Unmounting filesystems"
    20     umount -a -d -r 2> /dev/null
    21     # now reboot hard
    22     # This doesn't work nor does reboot
    23     # ctrlaltdel hard &
    24     # reboot -f
    25     LogIt "Using SysRq to reboot"
    26     echo s > /proc/sysrq-trigger
    27     echo u > /proc/sysrq-trigger
    28     echo b > /proc/sysrq-trigger
    29 
    30     # if we reach that point that's odd
    31     # That script should never end as the kernel crashes otherwise
    32     while [ "1" == "1" ]; do
    33         sleep 10
    34     done
     11
     12    reboot
    3513}
    3614
Note: See TracChangeset for help on using the changeset viewer.