com...@warewulf.lbl.gov
unread,May 29, 2016, 1:58:19 PM5/29/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to warewul...@lbl.gov
Author: bsallen
Date: 2016-05-29 10:58:18 -0700 (Sun, 29 May 2016)
New Revision: 1989
Modified:
trunk/provision/initramfs/init
Log:
Show both the kernel interface name we're configuring in the bootstrap, and the interface name set which the booted VNFS will use. Use ip addr to remove the IP address, as ifconfig doesn't appear to support it
Modified: trunk/provision/initramfs/init
===================================================================
--- trunk/provision/initramfs/init 2016-05-27 22:10:52 UTC (rev 1988)
+++ trunk/provision/initramfs/init 2016-05-29 17:58:18 UTC (rev 1989)
@@ -73,7 +73,7 @@
OSDEVICE=$3
RETVAL=1
- msg_white "Checking for network device: $DEVICE "
+ msg_white "Checking for network device: $DEVICE ($OSDEVICE)"
if ifconfig $DEVICE up >/dev/null 2>&1; then
wwsuccess
if [ -n "$WWMTU" ]; then
@@ -85,7 +85,7 @@
fi
fi
if [ -n "$WWIPADDR" -a -n "$WWNETMASK" -a -n "$WWMASTER" ]; then
- msg_white "Configuring $DEVICE statically: "
+ msg_white "Configuring $DEVICE ($OSDEVICE) statically: "
msg_gray "($WWIPADDR/$WWNETMASK)"
if ifconfig $DEVICE $WWIPADDR netmask $WWNETMASK up; then
wwsuccess
@@ -360,20 +360,20 @@
fi
if [ -n "$WWPOSTNETDOWN" ]; then
NETDEV=`cat /tmp/wwdev`
- if [ -f "/tmp/ifcfg-$NETDEV" ]; then
- . /tmp/ifcfg-$NETDEV
+ if [ -f "/tmp/ifcfg-$WWNETDEV" ]; then
+ . /tmp/ifcfg-$WWNETDEV
if [ -n "$IPADDR" -a -n "$NETMASK" ]; then
- wwlogger "Deleting network interface address $NETDEV:$IPADDR/$NETMASK"
- msg_white "Deleting network interface address $NETDEV:$IPADDR/$NETMASK"
- if ifconfig $NETDEV del $IPADDR netmask $NETMASK; then
+ wwlogger "Deleting network interface address $NETDEV:$IPADDR/$NETMASK ($WWNETDEV)"
+ msg_white "Deleting network interface address $NETDEV:$IPADDR/$NETMASK ($WWNETDEV)"
+ if ip addr del $IPADDR/$NETMASK dev $NETDEV; then
wwsuccess
else
wwfailure
fi
elif [ -n "$IPADDR" ]; then
- wwlogger "Deleting network interface address $NETDEV:$IPADDR"
- msg_white "Deleting network interface address $NETDEV:$IPADDR"
- if ifconfig $NETDEV del $IPADDR; then
+ wwlogger "Deleting network interface address $NETDEV:$IPADDR ($WWNETDEV)"
+ msg_white "Deleting network interface address $NETDEV:$IPADDR ($WWNETDEV)"
+ if ip addr del $IPADDR dev $NETDEV; then
wwsuccess
else
wwfailure
@@ -381,16 +381,16 @@
fi
- wwlogger "Shutting down network interface $NETDEV"
- msg_white "Shutting down network interface $NETDEV: "
+ wwlogger "Shutting down network interface $NETDEV ($WWNETDEV)"
+ msg_white "Shutting down network interface $NETDEV ($WWNETDEV): "
if ifconfig $NETDEV down; then
wwsuccess
else
wwfailure
fi
else
- wwfailure "Could not bring down $NETDEV"
- msg_white "Could not bring down $NETDEV"
+ wwfailure "Could not bring down $NETDEV ($WWNETDEV)"
+ msg_white "Could not bring down $NETDEV ($WWNETDEV)"
wwfailure
fi
fi