From 709d8bb2a63d4b69239afb9cdd2b1806f85edd67 Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Wed, 4 Aug 2010 17:47:05 +0800 Subject: [PATCH] 0-auto-detect: remove find_network_dev_name Now libnetutils/dhcp_utils can pass the interface to the service, so no need to define different services for different interfaces. --- initrd/scripts/0-auto-detect | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/initrd/scripts/0-auto-detect b/initrd/scripts/0-auto-detect index 6d03549..ac4c4a6 100644 --- a/initrd/scripts/0-auto-detect +++ b/initrd/scripts/0-auto-detect @@ -25,29 +25,6 @@ auto_detect() cat /sys/bus/*/devices/*/modalias | dev2mod } -find_network_dev_name() -{ - wififound=0 - rmline=`grep -n "#REMOVE FROM HERE" init.rc|cut -d':' -f1` - rmline=`expr $rmline + 1` - sed -i -e "$rmline,\$d" init.rc - dhcpcdopts="-o domain_name_servers -BKL" - for netdev in `ls /sys/class/net`; do - if [ $netdev = "lo" -o $netdev = "wmaster0" ]; then - continue - fi - w=/sys/class/net/$netdev - if [ -d $w/wireless -o -d $w/phy80211 ]; then - if [ $wififound -eq 0 ]; then - sed -i "s|\(^ *service wpa_supplicant .*\)\(-i.*\)\( -c.*$\)|\1-i $netdev\3|g" init.rc - wififound=1 - fi - fi - echo "service dhcpcd$netdev /system/bin/dhcpcd $dhcpcdopts $netdev" >> init.rc - echo -e " group system dhcp\n disabled\n oneshot\n" >> init.rc - done -} - load_modules() { if [ -n "$FOUND" ]; then @@ -68,6 +45,4 @@ load_modules() [ -c /dev/video0 ] || modprobe vivi [ -d /proc/asound/card0 ] || modprobe snd-dummy [ -c /dev/fb0 ] || modprobe uvesafb mode_option=${UVESA_MODE:-800x600}-16 ${UVESA_OPTION:-mtrr=3 scroll=redraw} - find_network_dev_name -# find_wifi_dev_name } -- 2.11.0