update net init scripts and basic validate script to use
authorAaron Klingaman <alk@cs.princeton.edu>
Wed, 27 Apr 2005 21:05:25 +0000 (21:05 +0000)
committerAaron Klingaman <alk@cs.princeton.edu>
Wed, 27 Apr 2005 21:05:25 +0000 (21:05 +0000)
new fields for the boot manager (NODE_KEY, NODE_ID, and NET_DEVICE)

conf_files/pl_netinit
conf_files/pl_validateconf

index bfec8bf..36bbc25 100644 (file)
@@ -242,16 +242,16 @@ fi
 # either a mac address (in which case we will need to find the device), or
 # the device itself
 
-if [[ -n "$PRIMARY_MAC" ]]; then
+if [[ -n "$NET_DEVICE" ]]; then
     # the user specified a mac address we should use. find the network
     # device for it.
-    echo "pl_netinit: looking for a device with mac address $PRIMARY_MAC"
+    echo "pl_netinit: looking for a device with mac address $NET_DEVICE"
 
     pushd .
     cd /sys/class/net
     for device in *; do
        dev_address=`cat $device/address`
-       if [[ "$dev_address" == "$PRIMARY_MAC" ]]; then
+       if [[ "$dev_address" == "$NET_DEVICE" ]]; then
            ETH_DEVICE=$device
            echo "pl_netinit: found device $ETH_DEVICE"
            break
@@ -271,13 +271,13 @@ else
 fi
 
 
-# if we couldn't find a device (would happen if PRIMARY_MAC was specified
+# if we couldn't find a device (would happen if NET_DEVICE was specified
 # but we couldn't find a device for that addresS), then abort the rest
 # of the startup
 
 if [[ -z "$ETH_DEVICE" ]]; then
     echo "pl_netinit: unable to find a usable device, check to make sure"
-    echo "pl_netinit: the PRIMARY_MAC field in the configuration file"
+    echo "pl_netinit: the NET_DEVICE field in the configuration file"
     echo "pl_netinit: cooresponds with a network adapter on this system"
     net_init_failed
 fi
index 1b9d183..54516d0 100644 (file)
@@ -3,7 +3,7 @@
 # Valid environment variables to appear in a planetlab config file
 TAGS='IP_METHOD HOST_NAME DOMAIN_NAME PROXY_SERVER
       IP_ADDRESS IP_GATEWAY IP_NETMASK IP_NETADDR IP_BROADCASTADDR 
-      IP_DNS1 IP_DNS2 PRIMARY_DEV PRIMARY_MAC'
+      IP_DNS1 IP_DNS2 NET_DEVICE NODE_KEY NODE_ID'
 
 # Valid characters that variable can be set to
 CHARS='[:alnum:]\.: _-'