From 41fb282b6d9396ce7e29ec7ce0ead187b20ed7b8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 20 Apr 2008 03:24:43 +0000 Subject: remove some redundant code SVN-Revision: 10870 --- package/base-files/files/etc/preinit | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'package/base-files/files/etc/preinit') diff --git a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit index 452209ff90..66bb1a5cc1 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