From 16ddb9350ab127ce50cb52211c7f361bd98a9367 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 20 Apr 2008 03:24:43 +0000 Subject: remove some redundant code git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10870 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/etc/preinit | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'package') diff --git a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit index 452209ff9..66bb1a5cc 100755 --- a/package/base-files/files/etc/preinit +++ b/package/base-files/files/etc/preinit @@ -59,17 +59,20 @@ set_state preinit echo "$HOTPLUG" > /proc/sys/kernel/hotplug eval ${FAILSAFE:+failsafe} lock -w /tmp/.failsafe -mount_root -[ -f /sysupgrade.tgz ] && { - echo "- config restore -" - cd / - mv sysupgrade.tgz /tmp - tar xzf /tmp/sysupgrade.tgz - rm -f /tmp/sysupgrade.tgz - sync -} -echo "- init -" +if [ -z "$INITRAMFS" ]; then + mount_root + [ -f /sysupgrade.tgz ] && { + echo "- config restore -" + cd / + mv sysupgrade.tgz /tmp + tar xzf /tmp/sysupgrade.tgz + rm -f /tmp/sysupgrade.tgz + sync + } + + echo "- init -" -killall hotplug2 -exec /sbin/init + killall hotplug2 + exec /sbin/init +fi -- cgit v1.2.3