#! /bin/sh PREREQ="" DESCRIPTION="Preconfiguring networking..." IFFILE="/root/etc/network/interfaces" prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" if [ "${STATICIP}" = "frommedia" -a -e "$IFFILE" ] ; then # will use existent /etc/network/interfaces log_end_msg exit 0 fi cat > "$IFFILE" <> "$IFFILE" <> "$IFFILE" < $resolv <> $resolv [ -n "$rc_domain" ] && echo "domain ${rc_domain}" >> $resolv [ -n "$rc_server0" ] && [ "$rc_server0" != "0.0.0.0" ] && echo "nameserver $rc_server0" >> $resolv [ -n "$rc_server1" ] && [ "$rc_server1" != "0.0.0.0" ] && echo "nameserver $rc_server1" >> $resolv cat $resolv >> /root/var/log/netboot.config fi fi fi if [ ! -x /root/usr/sbin/NetworkManager ]; then for i in eth0 eth1 eth2 ath0 wlan0; do grep -q "iface $i" $IFFILE && continue cat >> "$IFFILE" <