Use new style command substitution.

This commit is contained in:
christos 2004-10-11 15:00:51 +00:00
parent 04e7fe1971
commit 6e9a790e1f
12 changed files with 36 additions and 36 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 "."

View File

@ -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

View File

@ -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 }
' </etc/ntp.conf`
' </etc/ntp.conf)
fi
if [ -n "$ntpdate_hosts" ]; then
echo "Setting date via ntp."

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: ppp,v 1.7 2004/08/13 18:08:03 mycroft Exp $
# $NetBSD: ppp,v 1.8 2004/10/11 15:00:51 christos Exp $
#
# PROVIDE: ppp
@ -45,7 +45,7 @@ ppp_start()
ppp_hup()
{
pids="`check_process pppd`"
pids="$(check_process pppd)"
if [ -n "$pids" ]; then
for pid in $pids; do
kill $sig_hup $pid
@ -55,7 +55,7 @@ ppp_hup()
ppp_stop()
{
pids="`check_process pppd`"
pids="$(check_process pppd)"
if [ -n "$pids" ]; then
for pid in $pids; do
kill $sig_stop $pid

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: raidframeparity,v 1.2 2004/08/13 18:08:03 mycroft Exp $
# $NetBSD: raidframeparity,v 1.3 2004/10/11 15:00:51 christos Exp $
#
# REQUIRE: quota
@ -16,7 +16,7 @@ raidframeparity_start()
# Initiate parity/mirror reconstruction as needed, in the background.
#
(
for dev in `sysctl -n hw.disknames`; do
for dev in $(sysctl -n hw.disknames); do
case $dev in
raid[0-9]*)
raidctl -P $dev

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: securelevel,v 1.5 2004/08/13 18:08:03 mycroft Exp $
# $NetBSD: securelevel,v 1.6 2004/10/11 15:00:51 christos Exp $
#
# PROVIDE: securelevel
@ -19,7 +19,7 @@ securelevel_start()
# it is 0, change it to 1 here, before we start daemons
# or login services.
#
osecurelevel=`sysctl -n kern.securelevel`
osecurelevel=$(sysctl -n kern.securelevel)
if [ -n "$securelevel" -a "$securelevel" != "$osecurelevel" ]; then
if [ "$securelevel" -lt "$osecurelevel" ]; then
echo "Can't lower securelevel."

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: ypbind,v 1.7 2004/10/11 14:11:43 lukem Exp $
# $NetBSD: ypbind,v 1.8 2004/10/11 15:00:51 christos Exp $
#
# PROVIDE: ypbind
@ -16,7 +16,7 @@ start_precmd="ypbind_precmd"
ypbind_precmd()
{
_domain=`domainname`
_domain=$(domainname)
if [ -z "$_domain" ]; then
warn "domainname(1) is not set."
return 1

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: yppasswdd,v 1.8 2004/10/11 14:11:43 lukem Exp $
# $NetBSD: yppasswdd,v 1.9 2004/10/11 15:00:51 christos Exp $
#
# PROVIDE: yppasswdd
@ -17,7 +17,7 @@ start_precmd="yppasswdd_precmd"
yppasswdd_precmd()
{
_domain=`domainname`
_domain=$(domainname)
if [ -z "$_domain" ]; then
warn "domainname(1) is not set."
return 1

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: ypserv,v 1.6 2004/08/13 18:08:03 mycroft Exp $
# $NetBSD: ypserv,v 1.7 2004/10/11 15:00:51 christos Exp $
#
# PROVIDE: ypserv
@ -16,7 +16,7 @@ start_precmd="ypserv_precmd"
ypserv_precmd()
{
_domain=`domainname`
_domain=$(domainname)
if [ -z "$_domain" ]; then
warn "domainname(1) is not set."
return 1