sync base-files with whiterussian
[openwrt.git] / openwrt / package / base-files / default / etc / init.d / S10boot
1 #!/bin/sh
2 . /etc/nvram.sh
3
4 [ "$(uname -r|grep -c 2.4)" = "1" ] && {
5 echo "S" > /proc/jffs2_bbc
6 }
7
8 mkdir -p /var/run
9 mkdir -p /var/log
10 touch /var/log/wtmp
11 touch /var/log/lastlog
12
13 sed 's/^[^#]/insmod &/' /etc/modules /etc/modules.d/* 2>&-|ash
14
15 ifconfig lo 127.0.0.1 up
16 ifconfig eth0 promisc
17
18 [ "$(uname -r|grep -c 2.6)" = "1" ] && [ -x /sbin/robocfg ] && { # FIXME: replace when the new switch driver is integrated...
19 robocfg switch disable vlans enable reset vlan 0 ports "0 1 2 3 5t" vlan 1 ports "4 5t" port 4 state enabled stp none switch enable
20 robocfg show
21 }
22
23 HOSTNAME=$(nvram get wan_hostname)
24 HOSTNAME=${HOSTNAME%%.*}
25 echo ${HOSTNAME:=OpenWrt}>/proc/sys/kernel/hostname
26
27 vconfig set_name_type VLAN_PLUS_VID_NO_PAD
28
29 # automagically run firstboot
30 [ -z "$FAILSAFE" -a -z "$(nvram get no_root_swap)" ] && {
31 { mount|grep "on / type jffs2" 1>&-; } || firstboot
32 }
This page took 0.045914 seconds and 5 git commands to generate.