X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=initscripts%2Fpl_netinit;h=0fa960aa5d791663bafdc741683007dc5cd4f790;hb=417568827a6a6eaf1df70d3f2dc0cd7d8a35bd7b;hp=a53e3cd3c4c6e1dbeeaaa2fbbc3a61d625d89dcd;hpb=44168eb5e74cff6bdc3580f233858e4b25f0b49a;p=bootcd.git diff --git a/initscripts/pl_netinit b/initscripts/pl_netinit index a53e3cd..0fa960a 100755 --- a/initscripts/pl_netinit +++ b/initscripts/pl_netinit @@ -1,4 +1,5 @@ #!/bin/sh +#-*-shell-script-*- # the name of the floppy based network configuration # files (checked first). the name planet.cnf is kept @@ -128,13 +129,13 @@ find_node_config() # devices shopt -s nullglob - for device in /sys/block/[hs]d*; do - removable=`cat $device/removable` + for device in /sys/block/[hsv]d*; do + removable=$(cat $device/removable) if [[ $removable -ne 1 ]]; then continue fi - partitions=$(/bin/awk "\$4 ~ /`basename $device`[0-9]*/ { print \$4 }" /proc/partitions) + partitions=$(/bin/awk "\$4 ~ /$(basename $device)[0-9]*/ { print \$4 }" /proc/partitions) for partition in $partitions ; do check_dev=/dev/$partition @@ -256,7 +257,7 @@ if [[ -n "$NET_DEVICE" ]]; then pushd /sys/class/net for device in *; do - dev_address=`cat $device/address | tr A-Z a-z` + dev_address=$(cat $device/address | tr A-Z a-z) if [ "$device" == "$NET_DEVICE" -o "$dev_address" == "$NET_DEVICE" ]; then ETH_DEVICE=$device echo $(date "+%H:%M:%S") " pl_netinit: found device $ETH_DEVICE with mac address $dev_address" @@ -290,10 +291,9 @@ fi /sbin/ifconfig $ETH_DEVICE up 2>&1 > /dev/null if [[ $? -ne 0 ]]; then echo $(date "+%H:%M:%S") " pl_netinit: device $ETH_DEVICE does not exist, most likely" - echo $(date "+%H:%M:%S") " pl_netinit: this cd does not have hardware support for your" + echo $(date "+%H:%M:%S") " pl_netinit: this CD does not have hardware support for your" echo $(date "+%H:%M:%S") " pl_netinit: network adapter. please send the following lines" - echo $(date "+%H:%M:%S") " pl_netinit: to PlanetLab Support: support@planet-lab.org" - echo $(date "+%H:%M:%S") " pl_netinit: for further assistance" + echo $(date "+%H:%M:%S") " pl_netinit: to your PlanetLab support for further assistance" echo /sbin/lspci -n | /bin/grep "Class 0200" echo