From 6e9a790e1f2c92149d8bae50944711e4cfc1b4b2 Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 11 Oct 2004 15:00:51 +0000 Subject: [PATCH] Use new style command substitution. --- etc/rc.d/bootconf.sh | 6 +++--- etc/rc.d/downinterfaces | 4 ++-- etc/rc.d/ipnat | 4 ++-- etc/rc.d/mixerctl | 4 ++-- etc/rc.d/network | 22 +++++++++++----------- etc/rc.d/ntpdate | 6 +++--- etc/rc.d/ppp | 6 +++--- etc/rc.d/raidframeparity | 4 ++-- etc/rc.d/securelevel | 4 ++-- etc/rc.d/ypbind | 4 ++-- etc/rc.d/yppasswdd | 4 ++-- etc/rc.d/ypserv | 4 ++-- 12 files changed, 36 insertions(+), 36 deletions(-) diff --git a/etc/rc.d/bootconf.sh b/etc/rc.d/bootconf.sh index 0d1acee2e148..7c7dd063bf33 100755 --- a/etc/rc.d/bootconf.sh +++ b/etc/rc.d/bootconf.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: bootconf.sh,v 1.7 2003/04/03 11:25:10 is Exp $ +# $NetBSD: bootconf.sh,v 1.8 2004/10/11 15:00:51 christos Exp $ # # PROVIDE: bootconf @@ -15,13 +15,13 @@ bootconf_start() return 0 fi if [ -h /etc/etc.default ]; then - def=`ls -ld /etc/etc.default 2>&1` + def=$(ls -ld /etc/etc.default 2>&1) default="${def##*-> *etc.}" else default=current fi if [ "$default" = "current" ]; then - def=`ls -ld /etc/etc.current 2>&1` + def=$(ls -ld /etc/etc.current 2>&1) default="${def##*-> *etc.}" fi diff --git a/etc/rc.d/downinterfaces b/etc/rc.d/downinterfaces index 24f119703e7f..e22836fdc959 100644 --- a/etc/rc.d/downinterfaces +++ b/etc/rc.d/downinterfaces @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: downinterfaces,v 1.4 2002/08/16 18:05:19 martin Exp $ +# $NetBSD: downinterfaces,v 1.5 2004/10/11 15:00:51 christos Exp $ # # PROVIDE: downinterfaces @@ -10,7 +10,7 @@ if [ "x$1" = "xstop" ]; then . /etc/rc.conf -tmp=`ifconfig -lu` +tmp=$(ifconfig -lu) iflist="" for int in $tmp; do case $int in diff --git a/etc/rc.d/ipnat b/etc/rc.d/ipnat index ed6661a39a62..2291ab3a6ac2 100755 --- a/etc/rc.d/ipnat +++ b/etc/rc.d/ipnat @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: ipnat,v 1.11 2004/08/13 18:08:03 mycroft Exp $ +# $NetBSD: ipnat,v 1.12 2004/10/11 15:00:51 christos Exp $ # # PROVIDE: ipnat @@ -23,7 +23,7 @@ ipnat_start() if [ ! -f ${config} ]; then return 0 fi - if [ "`/sbin/sysctl -n net.inet.ip.forwarding`" = "0" ]; then + if [ "$(/sbin/sysctl -n net.inet.ip.forwarding)" = "0" ]; then logger -s -p daemon.warning -t ipnat \ "WARNING: net.inet.ip.forwarding is 0" fi diff --git a/etc/rc.d/mixerctl b/etc/rc.d/mixerctl index b85cfc096dce..0ab8c68ae4d0 100755 --- a/etc/rc.d/mixerctl +++ b/etc/rc.d/mixerctl @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: mixerctl,v 1.8 2004/08/13 18:08:03 mycroft Exp $ +# $NetBSD: mixerctl,v 1.9 2004/10/11 15:00:51 christos Exp $ # # PROVIDE: mixerctl @@ -22,7 +22,7 @@ mixerctl_start() if [ -s /var/db/${mix}.conf ]; then echo -n " $mix" /usr/bin/mixerctl -d /dev/$mix -n -w \ - `/bin/cat /var/db/${mix}.conf` + $(/bin/cat /var/db/${mix}.conf) fi done echo "." diff --git a/etc/rc.d/network b/etc/rc.d/network index a4128258cd37..7231cd9f4397 100755 --- a/etc/rc.d/network +++ b/etc/rc.d/network @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: network,v 1.45 2004/08/13 18:08:03 mycroft Exp $ +# $NetBSD: network,v 1.46 2004/10/11 15:00:51 christos Exp $ # # PROVIDE: network @@ -23,7 +23,7 @@ network_start() # otherwise use /etc/myname # if [ -z "$hostname" ] && [ -f /etc/myname ]; then - hostname=`cat /etc/myname` + hostname=$(cat /etc/myname) fi if [ -n "$hostname" ]; then echo "Hostname: $hostname" @@ -33,7 +33,7 @@ network_start() # DHCP later, as we will probably get the # hostname at that time. # - if ! checkyesno dhclient && [ -z "`hostname`" ]; then + if ! checkyesno dhclient && [ -z "$(hostname)" ]; then warn "\$hostname not set." fi fi @@ -42,7 +42,7 @@ network_start() # for NIS/YP domain name # if [ -z "$domainname" ] && [ -f /etc/defaultdomain ]; then - domainname=`cat /etc/defaultdomain` + domainname=$(cat /etc/defaultdomain) fi if [ -n "$domainname" ]; then echo "NIS domainname: $domainname" @@ -172,8 +172,8 @@ network_start() # if [ "$net_interfaces" != NO ]; then if checkyesno auto_ifconfig; then - tmp=`ifconfig -l` - for cloner in `ifconfig -C 2>/dev/null`; do + tmp=$(ifconfig -l) + for cloner in $(ifconfig -C 2>/dev/null); do for int in /etc/ifconfig.${cloner}[0-9]*; do [ ! -f $int ] && break tmp="$tmp ${int##*.}" @@ -229,7 +229,7 @@ network_start() # /etc/hosts. # if [ -z "$defaultroute" ] && [ -f /etc/mygate ]; then - defaultroute=`cat /etc/mygate` + defaultroute=$(cat /etc/mygate) fi if [ -n "$defaultroute" ]; then route add default $defaultroute @@ -241,7 +241,7 @@ network_start() # address if it is not using an stf* interface. # if [ -z "$defaultroute6" ] && [ -f /etc/mygate6 ]; then - defaultroute6=`cat /etc/mygate6` + defaultroute6=$(cat /etc/mygate6) fi if [ -n "$defaultroute6" ]; then if [ "$ip6mode" = "autohost" ]; then @@ -311,7 +311,7 @@ network_start() # wait till DAD is completed. always invoke it in case # if are configured manually by ifconfig # - dadcount=`sysctl -n net.inet6.ip6.dad_count 2>/dev/null` + dadcount=$(sysctl -n net.inet6.ip6.dad_count 2>/dev/null) sleep $dadcount sleep 1 @@ -355,7 +355,7 @@ network_stop() done < /etc/ifaliases fi - for int in `ifconfig -lu`; do + for int in $(ifconfig -lu); do eval args=\$ifaliases_$int if [ -n "$args" ]; then set -- $args @@ -371,7 +371,7 @@ network_stop() echo -n 'Downing network interfaces:' if [ "$net_interfaces" != NO ]; then if checkyesno auto_ifconfig; then - tmp=`ifconfig -l` + tmp=$(ifconfig -l) else tmp="$net_interfaces" fi diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate index 8a3be85cbe09..5942eb748001 100755 --- a/etc/rc.d/ntpdate +++ b/etc/rc.d/ntpdate @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: ntpdate,v 1.16 2004/08/13 18:08:03 mycroft Exp $ +# $NetBSD: ntpdate,v 1.17 2004/10/11 15:00:51 christos Exp $ # # PROVIDE: ntpdate @@ -17,14 +17,14 @@ stop_cmd=":" ntpdate_start() { if [ -z "$ntpdate_hosts" ]; then - ntpdate_hosts=`awk ' + ntpdate_hosts=$(awk ' /^#/ { next } /^(server|peer)[ \t]*127.127/ { next } /^(server|peer)/ { if ($2 ~ /^-[46]/) print $3 else print $2 } - '