ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/net-detect
sparky
cvs at pld-linux.org
Tue Feb 28 20:10:57 CET 2006
Author: sparky
Date: Tue Feb 28 20:10:51 2006
New Revision: 7045
Modified:
ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/net-detect
Log:
- backup (don't delete) ifcfg-* configs
- more verbose
Modified: ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/net-detect
==============================================================================
--- ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/net-detect (original)
+++ ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/net-detect Tue Feb 28 20:10:51 2006
@@ -10,9 +10,12 @@
. /usr/lib/ppcrcd/functions
+verbose 1 -G "Setting network cards"
confnet() {
- rm -f /etc/sysconfig/interfaces/ifcfg-eth*
+ for CONF in /etc/sysconfig/interfaces/ifcfg-eth*; do
+ mv -f $CONF $CONF.backup
+ done
COUNT=0
while [ -n "$1" ]; do
@@ -22,6 +25,7 @@
IPB=$( echo $eth | awk -F: '{print $2}')
GATE=$(echo $eth | awk -F: '{print $3}')
DNS=$( echo $eth | awk -F: '{print $4}')
+ verbose 3 " +-Setting $CARD with $IPB IP"
echo "alias eth${COUNT} ${CARD}" >> /etc/modprobe.conf
( echo "DEVICE=eth${COUNT}";
if [ "$IPB" == "dhcp" -o "$IPB" == "pump" ]; then
@@ -52,17 +56,19 @@
ETHS=$(cmdvar eth)
if [ -n "$ETHS" ]; then
+ verbose 2 -B " +-Using cmdline network config"
confnet $ETHS
else
if ! cmdopt nonveth; then
ETHS=$(nvvar eth)
if [ -n "$ETHS" ]; then
+ verbose 2 -B " +-Using nvram network config"
confnet $ETHS
fi
fi
if egrep -vq "^alias eth0" /etc/modprobe.conf; then
- verbose 0 "Autodetecting network"
+ verbose 2 -B " +-Autodetecting network"
confnet $(/usr/bin/pcidev /m net | sed 's/$/:dhcp/')
fi
fi
More information about the pld-cvs-commit
mailing list