From: Waldemar Brodkorb Date: Wed, 6 Jul 2005 10:33:59 +0000 (+0000) Subject: set boot_wait to on in the earliest possible moment. this makes webupgrade safer... X-Git-Tag: whiterussian_rc4~364 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e0a8345ca698977aa2a94f7a9efaa967f3393969;p=openwrt%2Fsvn-archive%2Fopenwrt.git set boot_wait to on in the earliest possible moment. this makes webupgrade safer and also nvram resets. idea and patch from Georg Lucas SVN-Revision: 1356 --- diff --git a/openwrt/target/default/target_skeleton/etc/init.d/rcS b/openwrt/target/default/target_skeleton/etc/init.d/rcS index e6daddc593..08bd9ed717 100755 --- a/openwrt/target/default/target_skeleton/etc/init.d/rcS +++ b/openwrt/target/default/target_skeleton/etc/init.d/rcS @@ -1,7 +1,13 @@ #!/bin/sh syslogd -C 16 klogd -${FAILSAFE:+telnetd -l /bin/login; ifup lan; exit} +if [ "$FAILSAFE" = "true" ];then + insmod $(head -1 /etc/modules) + ifconfig lo 127.0.0.1 up + ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up + telnetd -l /bin/login + exit +fi for i in /etc/init.d/S*; do $i start 2>&1 diff --git a/openwrt/target/default/target_skeleton/etc/preinit b/openwrt/target/default/target_skeleton/etc/preinit index 7a02e31215..061673035c 100755 --- a/openwrt/target/default/target_skeleton/etc/preinit +++ b/openwrt/target/default/target_skeleton/etc/preinit @@ -1,4 +1,8 @@ #!/bin/sh +[ "$(/usr/sbin/nvram get boot_wait)" != "on" ] && { + /usr/sbin/nvram set boot_wait=on + /usr/sbin/nvram commit +} mount none /proc -t proc insmod diag echo 0x01 > /proc/sys/diag diff --git a/openwrt/target/utils/src/trx.c b/openwrt/target/utils/src/trx.c index 79a04026ea..6f9fa41687 100644 --- a/openwrt/target/utils/src/trx.c +++ b/openwrt/target/utils/src/trx.c @@ -62,7 +62,7 @@ uint32_t crc32buf(char *buf, size_t len); #define TRX_MAGIC 0x30524448 /* "HDR0" */ #define TRX_VERSION 1 -#define TRX_MAX_LEN 0x3A0000 +#define TRX_MAX_LEN 0x5A0000 #define TRX_NO_HEADER 1 /* Do not write TRX header */ struct trx_header {