clean up handling of the root filesystem mount - remove broadcom specific junk from...
[openwrt-10.03/.git] / package / base-files / default / etc / init.d / S10boot
1 #!/bin/sh
2 . /etc/functions.sh
3
4 [ -f /proc/mounts ] || /sbin/mount_root
5 [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
6 vconfig set_name_type VLAN_PLUS_VID_NO_PAD
7
8 HOSTNAME=${wan_hostname%%.*}
9 echo ${HOSTNAME:=OpenWrt}>/proc/sys/kernel/hostname
10
11 mkdir -p /var/run
12 mkdir -p /var/log
13 touch /var/log/wtmp
14 touch /var/log/lastlog
15 [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
16
17 for iface in $(/sbin/ifconfig -a | awk '{print $1}' | grep eth); do
18         /usr/bin/env -i ACTION=add INTERFACE="$iface" /sbin/hotplug net
19 done
20
21 load_modules /etc/modules /etc/modules.d/*
22
23 ifconfig lo 127.0.0.1 up
24 ifconfig eth0 promisc
25