aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-04-20 03:24:43 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-04-20 03:24:43 +0000
commit7904db70d2bb52acbe095e12f98ed52d5381b5c0 (patch)
tree7eda9680af74e60f002ad688b82a0dbacc43fb84 /package
parent3c2c1b1b69099f69915fac013114ac7082ee6656 (diff)
downloadupstream-7904db70d2bb52acbe095e12f98ed52d5381b5c0.tar.gz
upstream-7904db70d2bb52acbe095e12f98ed52d5381b5c0.tar.bz2
upstream-7904db70d2bb52acbe095e12f98ed52d5381b5c0.zip
remove some redundant code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10870 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/etc/preinit27
1 files changed, 15 insertions, 12 deletions
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