You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
574 B
25 lines
574 B
8 years ago
|
#!/bin/sh
|
||
|
|
||
|
. /etc/init.d/globals
|
||
|
|
||
5 years ago
|
DO_REBOOT=0
|
||
|
|
||
|
if [ -f /var/update/zImage ]; then
|
||
8 years ago
|
DEV=`grep -i kernel /proc/mtd | cut -f 0 -s -d :`
|
||
4 years ago
|
test -e /dev/display && dt -t"Kernel Update. Please wait ..."
|
||
|
SHOWINFO "Updating kernel on device $DEV ..."
|
||
|
flash_erase /dev/$DEV 0 0 && cat /var/update/zImage > /dev/$DEV
|
||
|
test -e /dev/display && dt -t"Kernel Update OK."
|
||
|
SHOWINFO "Kernel update on device $DEV successful."
|
||
|
DO_REBOOT=1
|
||
5 years ago
|
rm -f /var/update/zImage
|
||
|
fi
|
||
|
|
||
|
if [ $DO_REBOOT == 1 ]; then
|
||
|
sync
|
||
|
sleep 2
|
||
4 years ago
|
test -e /dev/display && dt -t"Reboot"
|
||
|
SHOWINFO "Reboot ..."
|
||
5 years ago
|
reboot -f
|
||
8 years ago
|
fi
|