summaryrefslogtreecommitdiff
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
commit41fb282b6d9396ce7e29ec7ce0ead187b20ed7b8 (patch)
tree4d0ea72af791697e03ff75161b571606a3fa420a /package
parenta323a7bf2a131761180a1ffe01928dc2e7804837 (diff)
downloadmtk-20170518-41fb282b6d9396ce7e29ec7ce0ead187b20ed7b8.zip
mtk-20170518-41fb282b6d9396ce7e29ec7ce0ead187b20ed7b8.tar.gz
mtk-20170518-41fb282b6d9396ce7e29ec7ce0ead187b20ed7b8.tar.bz2
remove some redundant code
SVN-Revision: 10870
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 452209f..66bb1a5 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