Openwrt/package/base-files/files/etc/preinit
Mike Baker 4a41439c46 unified preinit environment
SVN-Revision: 7173
2007-05-10 14:37:47 +00:00

21 lines
320 B
Bash
Executable File

#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
. /etc/diag.sh
failsafe() {
lock /tmp/.failsafe
ash --login
}
[ -e /etc/preinit.arch ] && . /etc/preinit.arch
set_state preinit
mount_root ${FAILSAFE:+failsafe}
eval ${FAILSAFE:+failsafe}
lock -w /tmp/.failsafe
exec /sbin/init