add failsafe support for x86-2.6 and fix mdev support for platforms using /etc/preinit
[openwrt/openwrt.git] / package / base-files / files / etc / preinit
index 74d4e88..c60a0f8 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 # Copyright (C) 2006 OpenWrt.org
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-mount_root
+[ -e /etc/preinit.arch ] && . /etc/preinit.arch
+mount_root ${FAILSAFE:+failsafe}
 exec /sbin/init