From e99a57ffcbdb15b256888bf3096aa3ca2966199a Mon Sep 17 00:00:00 2001 From: Aaron Klingaman Date: Wed, 27 Apr 2005 21:05:25 +0000 Subject: [PATCH] update net init scripts and basic validate script to use new fields for the boot manager (NODE_KEY, NODE_ID, and NET_DEVICE) --- conf_files/pl_netinit | 10 +++++----- conf_files/pl_validateconf | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf_files/pl_netinit b/conf_files/pl_netinit index bfec8bf..36bbc25 100644 --- a/conf_files/pl_netinit +++ b/conf_files/pl_netinit @@ -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 diff --git a/conf_files/pl_validateconf b/conf_files/pl_validateconf index 1b9d183..54516d0 100644 --- a/conf_files/pl_validateconf +++ b/conf_files/pl_validateconf @@ -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:]\.: _-' -- 2.43.0