# A target should provide its detect_hardware function.
# On success, return 0 with the following values set.
-#
-# FB0DEV: framebuffer driver
-# LANDEV: lan driver
-# WIFDEV: wifi driver
-# SNDDEV: sound driver
-# CAMDEV: camera driver
-# PREDEV: any module the drivers depend on but can't be loaded automatically
-# EXTMOD: any other module
-
+# return 1 if it wants to use auto_detect
[ "$AUTO" != "1" ] && detect_hardware && FOUND=1
[ -n "$INSTALL" ] && do_install
setup_tslib
setup_dpi
post_detect
+find_network_dev_name
if [ -n "$DEBUG" ]; then
echo -e "\nUse Alt-F1/F2/F3 to switch between virtual consoles"
find_network_dev_name()
{
+ INITRC=init.rc
DHCPCD="/system/bin/dhcpcd -o domain_name_servers"
- rmline=`grep -n "#REMOVE FROM HERE" init.rc|cut -d':' -f1`
+ rmline=`grep -n "#REMOVE FROM HERE" $INITRC | cut -d':' -f1`
rmline=`expr $rmline + 1`
- sed -i -e "$rmline,\$d" init.rc
+ sed -i -e "$rmline,\$d" $INITRC
for netdev in `ls /sys/class/net`; do
- if [ "$netdev" != "lo" -a "$netdev" != "wmaster0" ]; then
- echo -e "\nservice dhcpcd_$netdev $DHCPCD -ABKL\n class main\n disabled\n oneshot\n" >> init.rc
- echo -e "service iprenew_$netdev $DHCPCD -n\n class main\n disabled\n oneshot" >> init.rc
- fi
+ case "$netdev" in
+ lo|ip6tnl*|sit*|tun*|eth0|wlan0|wmaster*)
+ ;;
+ *)
+ echo -e "\nservice dhcpcd_$netdev $DHCPCD -ABDKL\n class main\n disabled\n oneshot\n" >> $INITRC
+ echo -e "service iprenew_$netdev $DHCPCD -n\n class main\n disabled\n oneshot" >> $INITRC
+ ;;
+ esac
done
}
[ -c /dev/video0 ] || modprobe vivi
[ -d /proc/asound/card0 ] || modprobe snd-dummy
load_uvesafb
-
- find_network_dev_name
}