use $() instead of backquotes
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 14 Jan 2011 11:44:51 +0000 (12:44 +0100)
committerS.Çağlar Onur <caglar@verivue.com>
Tue, 15 Mar 2011 15:37:18 +0000 (11:37 -0400)
initscripts/pl_boot
initscripts/pl_netinit

index 16b7fa2..6541dec 100755 (executable)
@@ -20,11 +20,11 @@ ATTEMPTS_BEFORE_BACKUP=3
 BOOT_DIR=/usr/boot/
 
 # get the server we are going to be contacting
-BOOT_SERVER=`cat $BOOT_DIR/boot_server`
-BOOT_SERVER_PORT=`cat $BOOT_DIR/boot_server_port`
+BOOT_SERVER=$(cat $BOOT_DIR/boot_server)
+BOOT_SERVER_PORT=$(cat $BOOT_DIR/boot_server_port)
 
 # the file to request from the boot server
-BOOT_SERVER_PATH=`cat $BOOT_DIR/boot_server_path`
+BOOT_SERVER_PATH=$(cat $BOOT_DIR/boot_server_path)
 
 # location of the cacert for this boot server
 BOOT_SERVER_CACERT=$BOOT_DIR/cacert.pem
@@ -33,11 +33,11 @@ BOOT_SERVER_CACERT=$BOOT_DIR/cacert.pem
 BOOT_SERVER_GPG_KEYRING=$BOOT_DIR/pubring.gpg
 
 # get the backup server we are going to be contacting
-BACKUP_BOOT_SERVER=`cat $BOOT_DIR/backup/boot_server`
-BACKUP_BOOT_SERVER_PORT=`cat $BOOT_DIR/backup/boot_server_port`
+BACKUP_BOOT_SERVER=$(cat $BOOT_DIR/backup/boot_server)
+BACKUP_BOOT_SERVER_PORT=$(cat $BOOT_DIR/backup/boot_server_port)
 
 # the file to request from the backup boot server
-BACKUP_BOOT_SERVER_PATH=`cat $BOOT_DIR/backup/boot_server_path`
+BACKUP_BOOT_SERVER_PATH=$(cat $BOOT_DIR/backup/boot_server_path)
 
 # location of the cacert for the backup boot server
 BACKUP_BOOT_SERVER_CACERT=$BOOT_DIR/backup/cacert.pem
index 0ee8325..4b0cd8d 100755 (executable)
@@ -134,7 +134,7 @@ find_node_config()
            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 +256,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"