source: freewrt/package/base-files/default/etc/init.d/S10boot@ 28ff590

Last change on this file since 28ff590 was 28ff590, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

use /etc/hostname and not nvram to get the hostname

git-svn-id: svn://www.freewrt.org/branches/wbx-target-cleanup@576 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100755
File size: 691 bytes
Line 
1#!/bin/sh
2. /etc/functions.sh
3
4[ -f /proc/jffs2_bbc ] && echo S >/proc/jffs2_bbc
5
6mkdir -p /var/run
7mkdir -p /var/log
8touch /var/log/wtmp
9touch /var/log/lastlog
10[ "$FAILSAFE" = true ] && touch /tmp/.failsafe
11
12load_modules /etc/modules /etc/modules.d/*
13
14ifconfig lo 127.0.0.1 up
15ifconfig eth0 promisc
16
17# configure the switch based on nvram
18[ -d /proc/switch/eth0 ] && for nr in $(seq 0 15); do
19 vp="$(nvram get vlan${nr}ports)"
20 [ -z "$vp" -o -z "$(nvram get vlan${nr}hwname)" ] || \
21 echo "$vp" >/proc/switch/eth0/vlan/$nr/ports
22done
23
24HOSTNAME=$(cat /etc/hostname)
25HOSTNAME=${HOSTNAME%%.*}
26echo ${HOSTNAME:=FreeWRT} >/proc/sys/kernel/hostname
27
28vconfig set_name_type VLAN_PLUS_VID_NO_PAD
Note: See TracBrowser for help on using the repository browser.