SVN: rc-scripts/trunk: ppp/ip-down.d/logger ppp/ip-up.d/logger rc.d/init.d/cpusets rc.d/init.d/netwo...
baggins
baggins at pld-linux.org
Thu Apr 26 17:56:03 CEST 2007
Author: baggins
Date: Thu Apr 26 17:56:03 2007
New Revision: 8473
Modified:
rc-scripts/trunk/ppp/ip-down.d/logger
rc-scripts/trunk/ppp/ip-up.d/logger
rc-scripts/trunk/rc.d/init.d/cpusets
rc-scripts/trunk/rc.d/init.d/network
rc-scripts/trunk/rc.d/rc.sysinit
rc-scripts/trunk/run-parts
rc-scripts/trunk/service
rc-scripts/trunk/sysconfig/hwprofiles/Makefile.am
rc-scripts/trunk/sysconfig/interfaces/down.d/ppp/logger
rc-scripts/trunk/sysconfig/interfaces/up.d/ppp/logger
rc-scripts/trunk/sysconfig/network-scripts/functions.network
rc-scripts/trunk/sysconfig/network-scripts/ifdown
rc-scripts/trunk/sysconfig/network-scripts/ifup
rc-scripts/trunk/sysconfig/network-scripts/ifup-ipx
Log:
- use $() for command substitution
Modified: rc-scripts/trunk/ppp/ip-down.d/logger
==============================================================================
--- rc-scripts/trunk/ppp/ip-down.d/logger (original)
+++ rc-scripts/trunk/ppp/ip-down.d/logger Thu Apr 26 17:56:03 2007
@@ -2,5 +2,5 @@
# $Id$
# You can put here anything :)
#
-echo " Disconnect time: `date` from $PPP_REMOTE " >> /var/log/ppp.log
+echo " Disconnect time: $(date) from $PPP_REMOTE " >> /var/log/ppp.log
echo "+---------------------------------------------------------------+" >> /var/log/ppp.log
Modified: rc-scripts/trunk/ppp/ip-up.d/logger
==============================================================================
--- rc-scripts/trunk/ppp/ip-up.d/logger (original)
+++ rc-scripts/trunk/ppp/ip-up.d/logger Thu Apr 26 17:56:03 2007
@@ -3,4 +3,4 @@
# You can put here anything :)
#
echo "+---------------------------------------------------------------+" >> /var/log/ppp.log
-echo " Connect time: `date` with $PPP_REMOTE " >> /var/log/ppp.log
+echo " Connect time: $(date) with $PPP_REMOTE " >> /var/log/ppp.log
Modified: rc-scripts/trunk/rc.d/init.d/cpusets
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/cpusets (original)
+++ rc-scripts/trunk/rc.d/init.d/cpusets Thu Apr 26 17:56:03 2007
@@ -123,12 +123,12 @@
}
cpuset_files="$(cpuset_configs 'cpuset-*')"
-cpusets_boot=`
+cpusets_boot=$(
for i in $cpuset_files; do
ONBOOT=""; . "$i" 2>/dev/null
is_yes "$ONBOOT" && echo "${i##*/cpuset-}"
done
-`
+)
# See how we were called.
case "$1" in
@@ -143,14 +143,14 @@
echo "$cpusets_boot"
echo
nls "Currently empty cpusets:"
- for i in `ls /dev/cpuset 2>/dev/null`; do
+ for i in $(ls /dev/cpuset 2>/dev/null); do
if [ -d /dev/cpuset/$i ]; then
cpuset_empty $i && echo $i
fi
done
echo
nls "Currently active cpusets:"
- for i in `ls /dev/cpuset 2>/dev/null`; do
+ for i in $(ls /dev/cpuset 2>/dev/null); do
if [ -d /dev/cpuset/$i ]; then
cpuset_empty $i || echo $i
fi
Modified: rc-scripts/trunk/rc.d/init.d/network
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/network (original)
+++ rc-scripts/trunk/rc.d/init.d/network Thu Apr 26 17:56:03 2007
@@ -132,7 +132,7 @@
if [ -n "$bootprio" ]; then
# find all the interfaces besides loopback.
- interfaces_boot=`
+ interfaces_boot=$(
for a in $(echo "$bootprio" | sort -t= -n -k2,2); do
i="${a%:BOOTPRIO*}"
case $i in
@@ -141,9 +141,9 @@
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
done
- `
+ )
else
- interfaces_boot=`
+ interfaces_boot=$(
for i in $ifcfg_files; do
case ${i##*/} in
ifcfg-lo|ifcfg-sit*|ifcfg-atm*|ifcfg-lec*|ifcfg-nas*|ifcfg-br*|ifcfg-*.*) continue ;;
@@ -151,9 +151,9 @@
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
done
- `
+ )
- interfaces_vlan_boot=`
+ interfaces_vlan_boot=$(
for i in $ifcfg_files; do
case ${i##*/} in
ifcfg-*.*) ;;
@@ -162,9 +162,9 @@
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
done
- `
+ )
- interfaces_br_boot=`
+ interfaces_br_boot=$(
for i in $ifcfg_files; do
case ${i##*/} in
ifcfg-br*) ;;
@@ -173,9 +173,9 @@
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
done
- `
+ )
- interfaces_sit_boot=`
+ interfaces_sit_boot=$(
for i in $ifcfg_files; do
case ${i##*/} in
ifcfg-sit*) ;;
@@ -184,15 +184,15 @@
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
done
- `
+ )
fi
- tunnels=`
+ tunnels=$(
for i in $(network_interface_configs 'tnlcfg-*'); do
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/tnlcfg-}"
done
- `
+ )
}
start() {
Modified: rc-scripts/trunk/rc.d/rc.sysinit
==============================================================================
--- rc-scripts/trunk/rc.d/rc.sysinit (original)
+++ rc-scripts/trunk/rc.d/rc.sysinit Thu Apr 26 17:56:03 2007
@@ -742,7 +742,7 @@
nls "*** when you leave the shell."
echo
- PS1="`nls '(Repair filesystem)# '`"; export PS1
+ PS1="$(nls '(Repair filesystem)# ')"; export PS1
[ "$SELINUX" = "1" ] && disable_selinux
if ! is_no "$RUN_SULOGIN_ON_ERR"; then
/sbin/sulogin
Modified: rc-scripts/trunk/run-parts
==============================================================================
--- rc-scripts/trunk/run-parts (original)
+++ rc-scripts/trunk/run-parts Thu Apr 26 17:56:03 2007
@@ -36,9 +36,9 @@
RUNPARTS_DIR=$1
# assign absolute dir name
-olddir=`pwd`
+olddir=$(pwd)
cd $RUNPARTS_DIR
-RUNPARTS_ADIR=`pwd`
+RUNPARTS_ADIR=$(pwd)
cd $olddir
unset olddir
Modified: rc-scripts/trunk/service
==============================================================================
--- rc-scripts/trunk/service (original)
+++ rc-scripts/trunk/service Thu Apr 26 17:56:03 2007
@@ -4,8 +4,8 @@
PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
export PATH
-VERSION="`basename $0` ver. 0.91"
-USAGE="Usage: `basename $0` < option > | --status-all | \
+VERSION="$(basename $0) ver. 0.91"
+USAGE="Usage: $(basename $0) < option > | --status-all | \
[ service_name [ command | --full-restart ] ]"
SERVICE=
Modified: rc-scripts/trunk/sysconfig/hwprofiles/Makefile.am
==============================================================================
--- rc-scripts/trunk/sysconfig/hwprofiles/Makefile.am (original)
+++ rc-scripts/trunk/sysconfig/hwprofiles/Makefile.am Thu Apr 26 17:56:03 2007
@@ -2,8 +2,6 @@
hwprofilesdir = @sysconfigdir@/hwprofiles
-hwprofiles_DATA =
-noinst_DATA = \
- files
+hwprofiles_DATA = files
-EXTRA_DIST = $(hwprofiles_DATA) $(noinst_DATA)
+EXTRA_DIST = $(hwprofiles_DATA)
Modified: rc-scripts/trunk/sysconfig/interfaces/down.d/ppp/logger
==============================================================================
--- rc-scripts/trunk/sysconfig/interfaces/down.d/ppp/logger (original)
+++ rc-scripts/trunk/sysconfig/interfaces/down.d/ppp/logger Thu Apr 26 17:56:03 2007
@@ -2,5 +2,5 @@
# $Id$
# You can put here anything :)
#
-echo " Disconnect time: `date` from $PPP_REMOTE " >> /var/log/ppp.log
+echo " Disconnect time: $(date) from $PPP_REMOTE " >> /var/log/ppp.log
echo "+---------------------------------------------------------------+" >> /var/log/ppp.log
Modified: rc-scripts/trunk/sysconfig/interfaces/up.d/ppp/logger
==============================================================================
--- rc-scripts/trunk/sysconfig/interfaces/up.d/ppp/logger (original)
+++ rc-scripts/trunk/sysconfig/interfaces/up.d/ppp/logger Thu Apr 26 17:56:03 2007
@@ -3,4 +3,4 @@
# You can put here anything :)
#
echo "+---------------------------------------------------------------+" >> /var/log/ppp.log
-echo " Connect time: `date` with $PPP_REMOTE " >> /var/log/ppp.log
+echo " Connect time: $(date) with $PPP_REMOTE " >> /var/log/ppp.log
Modified: rc-scripts/trunk/sysconfig/network-scripts/functions.network
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/functions.network (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/functions.network Thu Apr 26 17:56:03 2007
@@ -171,7 +171,7 @@
vlan_setup()
{
- if [ -x /sbin/vconfig -a -e /proc/net/vlan/config ] && `echo $DEVICE | grep -q ^eth`; then
+ if [ -x /sbin/vconfig -a -e /proc/net/vlan/config ] && $(echo $DEVICE | grep -q ^eth); then
/sbin/vconfig set_name_type DEV_PLUS_VID_NO_PAD 2>&1 > /dev/null
ETH_VLANS="yes"
else
@@ -424,10 +424,11 @@
get_ppp_device_and_pid ()
{
if [ -f "/var/run/ppp-$DEVNAME.pid" ] ; then
- eval `{
+ eval $(
+ {
read PID ; echo "PID='$PID'"
read REALDEVICE ; echo "REALDEVICE=$REALDEVICE"
- } < "/var/run/ppp-$DEVNAME.pid"`
+ } < "/var/run/ppp-$DEVNAME.pid")
fi
if [ -z "$REALDEVICE" ] ; then
Modified: rc-scripts/trunk/sysconfig/network-scripts/ifdown
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifdown (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifdown Thu Apr 26 17:56:03 2007
@@ -101,7 +101,7 @@
check_device_down && exit 0
vlan_setup
-if is_yes $ETH_VLANS && `echo $DEVICE | grep -q ^eth` ; then
+if is_yes $ETH_VLANS && $(echo $DEVICE | grep -q ^eth) ; then
if echo "${DEVICE}" | grep -q '\.' ; then
# vlan down
ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
@@ -109,7 +109,7 @@
/sbin/vconfig rem ${DEVICE} 2>&1 > /dev/null
else
# downujemy interfejs nadrzedny do vlanow
- for VLANDEVICE in `ls /proc/net/vlan 2> /dev/null | grep ^${DEVICE}` ; do
+ for VLANDEVICE in $(ls /proc/net/vlan 2> /dev/null | grep ^${DEVICE}) ; do
# najpierw wszystkie vlany po kolei
ip addr flush dev ${VLANDEVICE} 2>&1 | grep -v "Nothing to flush"
ip link set ${VLANDEVICE} down
Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup Thu Apr 26 17:56:03 2007
@@ -29,7 +29,7 @@
exit 1
}
-if [ `id -u` != 0 ]; then
+if [ $(id -u) != 0 ]; then
if [ -x /sbin/usernetctl ]; then
exec /sbin/usernetctl $DEV up
fi
Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup-ipx
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup-ipx (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup-ipx Thu Apr 26 17:56:03 2007
@@ -36,15 +36,15 @@
# add ipx for all frame types
for frametype in '802.2' '802.2TR' '802.3' 'EtherII' 'SNAP'; do
framename=$(echo $frametype | awk ' { gsub(/\./,"_"); print $0 } ')
- case $(eval echo $(echo \$`echo IPXACTIVE_$framename`)) in
+ case $(eval echo $(echo \$$(echo IPXACTIVE_$framename))) in
yes|true)
- case $(eval echo $(echo \$`echo IPXPRIMARY_$framename`)) in
+ case $(eval echo $(echo \$$(echo IPXPRIMARY_$framename))) in
yes|true) primary="-p" ;;
*) primary= ;;
esac
ip link set $DEVICE up
/sbin/ipx_interface add $primary $DEVICE $frametype \
- $(eval echo $(echo \$`echo IPXNETNUM_$framename`))
+ $(eval echo $(echo \$$(echo IPXNETNUM_$framename)))
;;
esac
done
More information about the pld-cvs-commit
mailing list