summaryrefslogtreecommitdiff
path: root/package/base-files/src
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/src')
-rw-r--r--package/base-files/src/etc/banner3
-rw-r--r--package/base-files/src/etc/functions.sh10
-rw-r--r--package/base-files/src/etc/group9
-rw-r--r--package/base-files/src/etc/init.d/boot33
-rw-r--r--package/base-files/src/etc/init.d/done4
-rwxr-xr-xpackage/base-files/src/etc/init.d/rcK18
-rwxr-xr-xpackage/base-files/src/etc/init.d/rcS10
-rw-r--r--package/base-files/src/etc/inittab2
-rw-r--r--package/base-files/src/etc/ipkg.conf3
-rw-r--r--package/base-files/src/etc/mdev.conf20
-rw-r--r--package/base-files/src/etc/modules1
-rwxr-xr-xpackage/base-files/src/etc/network/if-post-down.d/03-wireless5
-rwxr-xr-xpackage/base-files/src/etc/network/if-post-down.d/04-bonding20
-rwxr-xr-xpackage/base-files/src/etc/network/if-pre-up.d/02-vlan10
-rwxr-xr-xpackage/base-files/src/etc/network/if-pre-up.d/04-wireless26
-rwxr-xr-xpackage/base-files/src/etc/network/if-pre-up.d/05-bonding37
-rwxr-xr-xpackage/base-files/src/etc/network/if-up.d/02-wireless1
-rw-r--r--package/base-files/src/etc/network/interfaces59
-rw-r--r--package/base-files/src/etc/passwd2
-rw-r--r--package/base-files/src/etc/profile15
-rw-r--r--package/base-files/src/etc/rc.shutdown6
-rw-r--r--package/base-files/src/etc/services0
-rwxr-xr-xpackage/base-files/src/init25
-rw-r--r--package/base-files/src/lib/mdev/init42
-rwxr-xr-xpackage/base-files/src/sbin/adkupdate112
-rwxr-xr-xpackage/base-files/src/usr/share/udhcpc/default.script11
26 files changed, 98 insertions, 386 deletions
diff --git a/package/base-files/src/etc/banner b/package/base-files/src/etc/banner
index 1ac725fd1..06cb2e4e3 100644
--- a/package/base-files/src/etc/banner
+++ b/package/base-files/src/etc/banner
@@ -4,5 +4,6 @@
| |_| | |_) | __/ | | |/ ___ \| |_| | . \
\___/| .__/ \___|_| |_/_/ \_\____/|_|\_\
|_|
- Linux created with OpenADK
+
+Linux Embedded Appliance created with OpenADK
diff --git a/package/base-files/src/etc/functions.sh b/package/base-files/src/etc/functions.sh
index 5d76f4843..8b2b3d665 100644
--- a/package/base-files/src/etc/functions.sh
+++ b/package/base-files/src/etc/functions.sh
@@ -11,7 +11,9 @@ append() {
}
load_modules() {
- (sed "s,^[^#][^[:space:]]*,insmod /lib/modules/$(uname -r)/&.ko," $* | sh 2>&- || :)
+ if [ -d /lib/modules/$(uname -r) ]; then
+ (sed "s,^[^#][^[:space:]]*,insmod /lib/modules/$(uname -r)/&.ko," $* | sh 2>&- || :)
+ fi
}
user_exists() {
@@ -53,9 +55,9 @@ add_service() {
}
add_rcconf() {
- rcconf_exists ${2-$1} || {
- echo "adding service ${2-$1} to /etc/rc.conf"
- printf '%s="%s"\t\t# %s\n' "${2:-$1}" "${3:-NO}" "$1" \
+ rcconf_exists $1 || {
+ echo "adding service $1 to /etc/rc.conf"
+ printf '%s="%s"\n' "${1}" "${2:-NO}" \
>>$IPKG_INSTROOT/etc/rc.conf
}
}
diff --git a/package/base-files/src/etc/group b/package/base-files/src/etc/group
index bbf6c0603..51d78238c 100644
--- a/package/base-files/src/etc/group
+++ b/package/base-files/src/etc/group
@@ -1,4 +1,9 @@
root:x:0:
-video:x:1:
-audio:x:2:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+video:x:6:
+audio:x:7:
nogroup:x:65534:
diff --git a/package/base-files/src/etc/init.d/boot b/package/base-files/src/etc/init.d/boot
deleted file mode 100644
index e30360142..000000000
--- a/package/base-files/src/etc/init.d/boot
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-#INIT 10
-[[ $1 = autostart ]] || exit 0
-
-. /etc/functions.sh
-
-mkdir -p /var/log
-mkdir -p /var/run
-touch /var/log/lastlog
-touch /var/log/wtmp
-ln -s /tmp /var/tmp
-
-echo 0 > /proc/sys/kernel/printk
-
-HOSTNAME=
-[[ -s /etc/hostname ]] && HOSTNAME=$(cat /etc/hostname)
-HOSTNAME=${HOSTNAME%%.*}
-echo ${HOSTNAME:=linux} >/proc/sys/kernel/hostname
-
-chown 0:0 /tmp; chmod 1777 /tmp
-
-load_modules /etc/modules
-for f in /etc/modules.d/*; do
- [[ -e $f ]] && load_modules /etc/modules.d/*
- break
-done
-# settle down, after module load
-sleep 2
-# any lvm volumes to activate?
-[ -x /usr/sbin/lvm ] && { lvm vgscan; lvm vgchange -ay;}
-# check and mount all filesystems not /
-[ -f /etc/fstab ] && { fsck -p >/dev/null; mount -a; swapon -a;}
-exit 0
diff --git a/package/base-files/src/etc/init.d/done b/package/base-files/src/etc/init.d/done
deleted file mode 100644
index e5b655bb6..000000000
--- a/package/base-files/src/etc/init.d/done
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-#INIT 98
-[[ $1 = autostart ]] && sysctl -p >&-
-exit 0
diff --git a/package/base-files/src/etc/init.d/rcK b/package/base-files/src/etc/init.d/rcK
deleted file mode 100755
index 9d0e06440..000000000
--- a/package/base-files/src/etc/init.d/rcK
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-{
- grep '^#INIT ' /etc/init.d/* | \
- sort -rnk2 | \
- while read line; do
- shebang=$(sed -n '1s/^#![ ]*//p' ${line%%:*})
- case $shebang in
- *[\ \ ]*) shebang=\'$(echo X"$shebang" | sed \
- -e 's/^X//' -e "s/'/'\\\\''/g" \
- -e 's/^\([^ ][^ ]*\)[ ]*$/\1/' \
- -e 's/^\([^ ][^ ]*\)[ ][ ]*\(..*\)$/\1 \2/' \
- -e 's/^\([^ ][^ ]*\) /\1'\'' '\''/')\' ;;
- esac
- ${shebang:-/bin/sh} ${line%%:*} autostop 2>&1
- done
- test -e /etc/rc.shutdown && (/bin/sh /etc/rc.shutdown) 2>&1
-} | logger -s -p 6 -t ''
diff --git a/package/base-files/src/etc/init.d/rcS b/package/base-files/src/etc/init.d/rcS
deleted file mode 100755
index 55c86729c..000000000
--- a/package/base-files/src/etc/init.d/rcS
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-{
- grep '^#INIT ' /etc/init.d/* | \
- sort -nk2 | \
- while read line; do
- sh ${line%%:*} autostart 2>&1
- done
- test -e /etc/init.d/boot.local && (/bin/sh /etc/init.d/boot.local) 2>&1
-} | logger -p 6 -t '' &
diff --git a/package/base-files/src/etc/inittab b/package/base-files/src/etc/inittab
deleted file mode 100644
index 79e69d931..000000000
--- a/package/base-files/src/etc/inittab
+++ /dev/null
@@ -1,2 +0,0 @@
-::sysinit:/etc/init.d/rcS
-::shutdown:/etc/init.d/rcK
diff --git a/package/base-files/src/etc/ipkg.conf b/package/base-files/src/etc/ipkg.conf
deleted file mode 100644
index cef6d2845..000000000
--- a/package/base-files/src/etc/ipkg.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-src @VENDOR@ http://@HOST@/@SYSTEM@_@ARCH@_@LIBC@/packages
-dest root /
-dest ram /tmp
diff --git a/package/base-files/src/etc/mdev.conf b/package/base-files/src/etc/mdev.conf
deleted file mode 100644
index 4cc06251a..000000000
--- a/package/base-files/src/etc/mdev.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-null 0:0 777
-zero 0:0 666
-u?random 0:0 644
-console 0:0 600
-ptmx 0:0 666
-tty 0:0 666
-tty[0-9]* 0:0 666
-ttyS* 0:0 640
-rtc0 root:root 660 @ln -sf /dev/rtc0 /dev/rtc
-device-mapper 0:0 660 @test -d /dev/mapper || mkdir /dev/mapper
-tun 0:0 660 >net/tun
-fb0 root:video 660
-audio root:audio 660 >snd/audio
-dsp root:audio 660 >snd/dsp
-timer root:audio 660 >snd/timer
-controlC0 root:audio 660 >snd/controlC0
-pcmC0D0c root:audio 660 >snd/pcmC0D0c
-pcmC0D0p root:audio 660 >snd/pcmC0D0p
-msr0 root:root 660 @(mkdir -p /dev/cpu/0 && ln -sf /dev/msr0 /dev/cpu/0/msr)
-.* 0:0 644 @/lib/mdev/init
diff --git a/package/base-files/src/etc/modules b/package/base-files/src/etc/modules
deleted file mode 100644
index 014f40f2b..000000000
--- a/package/base-files/src/etc/modules
+++ /dev/null
@@ -1 +0,0 @@
-# add modules to load on startup here
diff --git a/package/base-files/src/etc/network/if-post-down.d/03-wireless b/package/base-files/src/etc/network/if-post-down.d/03-wireless
index 86e0c73e1..a32e58781 100755
--- a/package/base-files/src/etc/network/if-post-down.d/03-wireless
+++ b/package/base-files/src/etc/network/if-post-down.d/03-wireless
@@ -1,5 +1,4 @@
-#!/bin/sh
-set -e
+#!/bin/sh
[ "${IFACE%%[0-9]*}" = "wlan" ] || exit 0
@@ -11,7 +10,7 @@ case "$IF_WIRELESS_MODE" in
sta)
[ "$IF_WIRELESS_SECURITY" != "none" ] && {
logger -t wireless "Killing wpa_supplicant"
- pkill wpa_supplicant
+ kill -9 $(cat /var/run/wpa_supplicant.pid)
}
;;
*)
diff --git a/package/base-files/src/etc/network/if-post-down.d/04-bonding b/package/base-files/src/etc/network/if-post-down.d/04-bonding
new file mode 100755
index 000000000..0b9c9f362
--- /dev/null
+++ b/package/base-files/src/etc/network/if-post-down.d/04-bonding
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+case "$IF_BOND_PORTS" in
+"")
+ exit 0
+ ;;
+none)
+ INTERFACES=""
+ ;;
+*)
+ INTERFACES="$IF_BOND_PORTS"
+ ;;
+esac
+
+for IF in $INTERFACES; do
+ ip link set $IF nomaster
+ ip link set $IF down
+done
+ip link del $IFACE
+exit 0
diff --git a/package/base-files/src/etc/network/if-pre-up.d/02-vlan b/package/base-files/src/etc/network/if-pre-up.d/02-vlan
index 26b33ca80..f153df564 100755
--- a/package/base-files/src/etc/network/if-pre-up.d/02-vlan
+++ b/package/base-files/src/etc/network/if-pre-up.d/02-vlan
@@ -1,13 +1,7 @@
#!/bin/sh
-which vconfig || {
- echo "vconfig executable not found, aborting"
- exit 0
-}
-[ -d /proc/net/vlan ] || {
- echo "no kernel support for 802.1q found, aborting"
- exit 0
-}
+which vconfig >/dev/null || exit 0
+[ -d /proc/net/vlan ] || exit 0
case "$IFACE" in
vlan*)
diff --git a/package/base-files/src/etc/network/if-pre-up.d/04-wireless b/package/base-files/src/etc/network/if-pre-up.d/04-wireless
index ebcec5a12..ef070c5bc 100755
--- a/package/base-files/src/etc/network/if-pre-up.d/04-wireless
+++ b/package/base-files/src/etc/network/if-pre-up.d/04-wireless
@@ -1,18 +1,17 @@
#!/bin/sh
-set -e
[ "${IFACE%%[0-9]*}" = "wlan" ] || exit 0
[ "$IF_WIRELESS_SSID" ] || exit 1
-[ "$IF_WIRELESS_CHANNEL" ] || exit 1
[ "$IF_WIRELESS_HWMODE" ] || IF_WIRELESS_HWMODE=g
[ "$IF_WIRELESS_EXTENSION" ] || IF_WIRELESS_EXTENSION=0
-rfkill unblock wlan 2>/dev/null
+[ -x /usr/sbin/rfkill ] && rfkill unblock wlan 2>/dev/null
wpa=0
wpa1=0
wpa2=0
+pairwise=""
case "$IF_WIRELESS_SECURITY" in
none)
@@ -24,10 +23,12 @@ case "$IF_WIRELESS_SECURITY" in
wpa)
sec=1
wpa1=1
+ pairwise=TKIP
;;
wpa2)
sec=1
wpa2=1
+ pairwise=CCMP
;;
wpa+wpa2)
sec=1
@@ -38,6 +39,8 @@ case "$IF_WIRELESS_SECURITY" in
;;
esac
+[ "$IF_WIRELESS_PAIRWISE" ] || IF_WIRELESS_PAIRWISE=$pairwise
+
case "$IF_WIRELESS_MODE" in
ap)
logger -t hostap "Creating hostapd configuration"
@@ -56,14 +59,14 @@ case "$IF_WIRELESS_MODE" in
logger -t hostap "using WPA for security"
echo "wpa=1" >> /tmp/hostapd.conf
echo "wpa_key_mgmt=WPA-PSK" >> /tmp/hostapd.conf
- echo "wpa_pairwise=TKIP" >> /tmp/hostapd.conf
+ echo "wpa_pairwise=$IF_WIRELESS_PAIRWISE" >> /tmp/hostapd.conf
echo "wpa_passphrase=$IF_WIRELESS_PASSPHRASE" >> /tmp/hostapd.conf
}
[ $wpa2 -eq 1 ] && {
logger -t hostap "using WPA2 for security"
echo "wpa=2" >> /tmp/hostapd.conf
echo "wpa_key_mgmt=WPA-PSK" >> /tmp/hostapd.conf
- echo "rsn_pairwise=CCMP" >> /tmp/hostapd.conf
+ echo "rsn_pairwise=$IF_WIRELESS_PAIRWISE" >> /tmp/hostapd.conf
echo "wpa_passphrase=$IF_WIRELESS_PASSPHRASE" >> /tmp/hostapd.conf
}
[ $wpa -eq 1 ] && {
@@ -74,8 +77,12 @@ case "$IF_WIRELESS_MODE" in
echo "rsn_pairwise=CCMP" >> /tmp/hostapd.conf
echo "wpa_passphrase=$IF_WIRELESS_PASSPHRASE" >> /tmp/hostapd.conf
}
+ [ -f /etc/hostapd.conf.post ] && \
+ cat /etc/hostapd.conf.post >> /tmp/hostapd.conf
;;
sta)
+ # need to wait for wlan drivers to settle down
+ sleep 1
ip link set up dev ${IFACE}
[ $IF_WIRELESS_EXTENSION -eq 1 ] && {
[ -x /usr/sbin/iwconfig ] || {
@@ -90,8 +97,11 @@ case "$IF_WIRELESS_MODE" in
exit 1
}
driver=nl80211
- iw dev ${IFACE} set channel $IF_WIRELESS_CHANNEL
- iw dev ${IFACE} connect $IF_WIRELESS_SSID
+ [ $sec -eq 2 ] && {
+ iw dev ${IFACE} connect "$IF_WIRELESS_SSID" key d:0:$IF_WIRELESS_PASSPHRASE
+ } || {
+ iw dev ${IFACE} connect "$IF_WIRELESS_SSID" 2>/dev/null
+ }
}
[ $wpa2 -eq 1 ] && {
[ -x /usr/sbin/wpa_supplicant ] || {
@@ -105,7 +115,7 @@ case "$IF_WIRELESS_MODE" in
echo " psk=\"$IF_WIRELESS_PASSPHRASE\"" >> /tmp/wpa_supplicant.conf
echo " priority=5" >> /tmp/wpa_supplicant.conf
echo "}" >> /tmp/wpa_supplicant.conf
- wpa_supplicant -B -D${driver} -i${IFACE} -c/tmp/wpa_supplicant.conf
+ wpa_supplicant -B -D${driver} -i${IFACE} -P/var/run/wpa_supplicant.pid -c/tmp/wpa_supplicant.conf
}
;;
*)
diff --git a/package/base-files/src/etc/network/if-pre-up.d/05-bonding b/package/base-files/src/etc/network/if-pre-up.d/05-bonding
new file mode 100755
index 000000000..489a2fcad
--- /dev/null
+++ b/package/base-files/src/etc/network/if-pre-up.d/05-bonding
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+INTERFACES=""
+BONDOPTS=""
+for var in $(env | grep '^IF_BOND_'); do
+ val="${var#*=}"
+ opt="${var%%=*}"
+ if [ "$opt" == "IF_BOND_PORTS" ]; then
+ case "$val" in
+ none)
+ INTERFACES=""
+ ;;
+ *)
+ INTERFACES="$val"
+ ;;
+ esac
+ continue
+ fi
+ opt="$(tr '[A-Z]' '[a-z]' <<< ${opt#IF_BOND_})"
+ BONDOPTS+=" $opt"
+ [ -n "$val" ] && BONDOPTS+=" $val"
+done
+
+[ -n "$INTERFACES" ] || exit 0
+
+ip link add $IFACE type bond ${BONDOPTS} || exit 1
+for IF in $INTERFACES; do
+ if ! grep -q $IF /proc/net/dev; then
+ echo "Error: interface '$IF' does not exist!"
+ ip link del $IFACE
+ exit 1
+ fi
+ ip link set $IF master $IFACE
+ ip link set $IF up
+done
+
+exit 0
diff --git a/package/base-files/src/etc/network/if-up.d/02-wireless b/package/base-files/src/etc/network/if-up.d/02-wireless
index cd9d2af3f..1ec73fed2 100755
--- a/package/base-files/src/etc/network/if-up.d/02-wireless
+++ b/package/base-files/src/etc/network/if-up.d/02-wireless
@@ -1,5 +1,4 @@
#!/bin/sh
-set -e
[ "${IFACE%%[0-9]*}" = "wlan" ] || exit 0
diff --git a/package/base-files/src/etc/network/interfaces b/package/base-files/src/etc/network/interfaces
deleted file mode 100644
index dbde94b80..000000000
--- a/package/base-files/src/etc/network/interfaces
+++ /dev/null
@@ -1,59 +0,0 @@
-auto lo
-iface lo inet loopback
-
-auto eth0
-iface eth0 inet dhcp
-
-## static network configuration
-#auto eth0
-#iface eth0 inet static
-# address 192.168.1.1
-# netmask 255.255.255.0
-# broadcast +
-# gateway 192.168.1.254
-##
-
-## bridge configuration
-#auto br0
-#iface br0 inet static
-# address 192.168.99.1
-# netmask 255.255.255.0
-# broadcast +
-# bridge-ports eth0 eth1
-##
-
-## pppoe configuration
-#auto ppp0
-#iface ppp0 inet ppp
-# use-template pppoe
-# provider isp
-# ppp-mtu 1412
-# ppp-username foo
-# ppp-password bar
-# ppp-device eth1
-##
-
-## wireless client configuration
-#auto wlan0
-#iface wlan0 inet dhcp
-# wireless-ssid myap
-# wireless-channel 11
-# wireless-mode sta
-# wireless-security wpa2
-# wireless-passphrase xxxxxx
-##
-
-## wireless accesspoint configuration
-#auto wlan0
-#iface wlan0 inet static
-# address 192.168.40.10
-# netmask 255.255.255.0
-# broadcast +
-# wireless-ssid myap
-# wireless-channel 8
-# wireless-mode ap
-# wireless-security wpa2
-# wireless-passphrase xxxxxx
-##
-
-# for more special cases see: http://www.openadk.org/doku.php?id=network
diff --git a/package/base-files/src/etc/passwd b/package/base-files/src/etc/passwd
index 32531eb92..30e0c23f9 100644
--- a/package/base-files/src/etc/passwd
+++ b/package/base-files/src/etc/passwd
@@ -1,2 +1,4 @@
root:x:0:0:root:/root:/bin/sh
+daemon:x:1:1:daemon::/bin/false
+bin:x:2:2:bin::/bin/false
nobody:*:65534:65534:nobody:/var:/bin/false
diff --git a/package/base-files/src/etc/profile b/package/base-files/src/etc/profile
deleted file mode 100644
index 96f03b980..000000000
--- a/package/base-files/src/etc/profile
+++ /dev/null
@@ -1,15 +0,0 @@
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-export TERM=linux
-export EDITOR=/bin/vi
-if [[ $(id -u) = 0 ]]; then
- export PS1='`whoami`@`hostname`:`pwd` # '
-else
- export PS1='`whoami`@`hostname`:`pwd` $ '
-fi
-cat /etc/banner 2>&-
-[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
-[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
-[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 "$@"; }
-alias l='ls -lF'
-alias la='ls -A'
-alias ll='ls -alF'
diff --git a/package/base-files/src/etc/rc.shutdown b/package/base-files/src/etc/rc.shutdown
deleted file mode 100644
index 8716dc59e..000000000
--- a/package/base-files/src/etc/rc.shutdown
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-cd /
-sync
-for i in $(grep -v ^# /etc/fstab 2>/dev/null|awk '{ print $2 }');do
- umount $i 2>/dev/null
-done
diff --git a/package/base-files/src/etc/services b/package/base-files/src/etc/services
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/package/base-files/src/etc/services
diff --git a/package/base-files/src/init b/package/base-files/src/init
deleted file mode 100755
index 98d24c834..000000000
--- a/package/base-files/src/init
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-echo "System initialization ..."
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-mount -t devtmpfs devtmpfs /dev >/dev/null 2>&1
-mount -nt proc proc /proc
-mount -o nosuid,nodev,noexec -t sysfs sysfs /sys
-[ ! -f /etc/notmpfs ] && {
- size=$(cat /etc/tmpfs 2>/dev/null)
- [ -z $size ] && size=2048
- mount tmpfs /tmp -t tmpfs -o nosuid,nodev,mode=1777,size=${size}k
-}
-mount -o remount,nosuid,size=128k,mode=0755 -t tmpfs mdev /dev
-[ -d /dev/pts ] || mkdir /dev/pts
-[ -d /dev/shm ] || mkdir /dev/shm
-mount -o nosuid,noexec -t tmpfs tmpfs /dev/shm
-mount -o nosuid,noexec -t devpts devpts /dev/pts
-exec 0<>/dev/console >&0 2>&0
-echo >/dev/mdev.seq
-echo "/sbin/mdev" >/proc/sys/kernel/hotplug
-mdev -s
-cat /etc/.rnd >/dev/urandom 2>&1
-[ -x /kexecinit ] && { /kexecinit; }
-[ -x /cryptinit ] && { /cryptinit; exec switch_root /mnt "/init";}
-[ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;} || mount -o remount,rw /
-exec /sbin/init
diff --git a/package/base-files/src/lib/mdev/init b/package/base-files/src/lib/mdev/init
deleted file mode 100644
index f2b7125b8..000000000
--- a/package/base-files/src/lib/mdev/init
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-if [ "$SUBSYSTEM" == "firmware" ];then
- logger "Firmware load for $FIRMWARE requested"
- if [ "$ACTION" == "add" ];then
- if [ -e "/lib/firmware/$FIRMWARE" ];then
- logger "Firmware loading ..."
- echo 1 > /sys$DEVPATH/loading
- cat "/lib/firmware/$FIRMWARE" > /sys$DEVPATH/data
- echo 0 > /sys$DEVPATH/loading
- logger "finished."
- else
- logger "Firmware file $FIRMWARE not found"
- echo -1 > /sys$DEVPATH/loading
- fi
- fi
-fi
-if [ "$SUBSYSTEM" == "pcmcia_socket" ];then
- logger "Setting up PCMCIA socket resource database"
- if [ "$ACTION" == "add" ];then
- /usr/sbin/pcmcia-socket-startup
- fi
-fi
-if [ "$SUBSYSTEM" == "usb" ];then
- if [ "$ACTION" == "add" ];then
- if [ "$DEVTYPE" == "usb_device" ];then
- if [ "$PRODUCT" == "12d1/1003/0" ];then
- if [ ! -f /tmp/.huawei ];then
- logger "USB device added with: $PRODUCT"
- usbmods=$(lsmod|grep ^usbserial|awk '{ print $4 }'|sed -e 's/,/ /g')
- for i in $usbmods;do rmmod $i;done
- rmmod usbserial
- lsmod >> /tmp/debug
- test -x /sbin/huawei && /sbin/huawei >> /tmp/debug
- insmod /lib/modules/$(uname -r)/usbserial.ko product=0x1003 vendor=0x12d1
- for i in $usbmods;do insmod /lib/modules/$(uname -r)/$i.ko; done
-
- touch /tmp/.huawei
- fi
- fi
- fi
- fi
-fi
diff --git a/package/base-files/src/sbin/adkupdate b/package/base-files/src/sbin/adkupdate
deleted file mode 100755
index b5477412f..000000000
--- a/package/base-files/src/sbin/adkupdate
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/sh
-
-who=$(id -u)
-if [ $who -ne 0 ]; then
- echo 'Exit. System update must be run as root.'
- exit 1
-fi
-
-system=$(awk '/system type/ { print $5 }' /proc/cpuinfo 2>/dev/null)
-
-if [ -x /sbin/mtd ];then
- if [ "$system" == "AR7" ];then
- updatecmd="dd bs=16 skip=3 | mtd -r write - linux"
- else
- updatecmd="mtd -r write - linux"
- fi
-else
- updatecmd="gunzip -c | tar -xf -"
-fi
-
-
-check_exit() {
- if [ $? -ne 0 ];then
- echo "Update failed."
- exit 1
- fi
-}
-
-prepare() {
- cd /
- if [ -x /sbin/cfgfs ];then
- mount -o bind /tmp/.cfgfs/root /etc
- check_exit
- mount -o remount,rw /etc
- check_exit
- fi
- mount -o remount,rw /
- check_exit
- if [ "$system" == "RB532" ];then
- mount -t yaffs2 /dev/mtdblock0 /boot
- elif [ "$system" == "AR7130" ];then
- mount -t yaffs2 /dev/mtdblock1 /boot
- elif [ "$system" == "FOXG20" ];then
- mount -t vfat /dev/mmcblk0p1 /boot
- fi
-}
-
-extract_from_file() {
- prepare
- cat $1 | eval $updatecmd
- check_exit
-}
-
-extract_from_ssh() {
- prepare
- ssh $1 "cat $2" | eval $updatecmd
- check_exit
-}
-
-extract_from_http() {
- prepare
- wget -O - $1 | eval $updatecmd
- check_exit
-}
-
-case $1 in
- file://*|/*)
- url=$(echo $1|sed -e "s#file://##")
- echo "Updating system from $1"
- extract_from_file $url
- ;;
- ssh://*)
- host=$(echo $1|sed -e "s#ssh://\(.*\):.*#\1#")
- file=$(echo $1|sed -e "s#ssh://.*:\(.*\)#\1#")
- echo "Updating system from $1"
- extract_from_ssh $host $file
- ;;
- http://*|ftp://*)
- echo "Updating system from $1"
- extract_from_http $1
- ;;
- *)
- echo "No or wrong uri given. exit."
- echo "Use one of the following uri:"
- echo "http://myserver/myupdate.tar.gz"
- echo "ssh://myuser@myserver:/my/path/myupdate.tar.gz"
- echo "file:///mypath/myupdate.tar.gz"
- exit 1
- ;;
-esac
-
-# fix permissions
-if [ -f /usr/bin/sudo ];then
- chmod 4755 /usr/bin/sudo
-fi
-if [ -f /usr/bin/Xorg ];then
- chmod 4755 /usr/bin/Xorg
-fi
-
-sync
-if [ -x /sbin/cfgfs ];then
- umount /etc
-fi
-if [ "$system" == "RB532" ];then
- umount -f /boot
-elif [ "$system" == "AR7130" ];then
- umount -f /boot
-elif [ "$system" == "FOXG20" ];then
- umount -f /boot
-fi
-
-echo "Update sucessful. You should reboot now."
diff --git a/package/base-files/src/usr/share/udhcpc/default.script b/package/base-files/src/usr/share/udhcpc/default.script
index 415bf92a4..7e9149e6e 100755
--- a/package/base-files/src/usr/share/udhcpc/default.script
+++ b/package/base-files/src/usr/share/udhcpc/default.script
@@ -8,33 +8,26 @@ RESOLV_CONF=/etc/resolv.conf
case $1 in
(deconfig)
- ip addr flush $interface
+ # removes ipv6 link-local address, which is bad
+ # ip addr flush $interface
;;
(renew|bound)
ip addr add $ip/${mask:-24} brd + dev $interface
if [[ -n $router ]]; then
- echo "deleting routers"
while ip route del default >&- 2>&-; do :; done
for i in $router; do
- echo "adding router $i"
ip route add to default via $i
done
fi
-
- touch /tmp/resolv.conf
- ln -sf /tmp/resolv.conf $RESOLV_CONF
echo -n >$RESOLV_CONF
${domain:+echo search $domain} >>$RESOLV_CONF
for i in $dns; do
- echo "adding dns $i"
echo "nameserver $i" >>$RESOLV_CONF
done
-
# user rules
[ -f /etc/udhcpc.user ] && . /etc/udhcpc.user
;;
esac
-
exit $?