]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- use $() for command substitution
authorJan Rękorajski <baggins@pld-linux.org>
Thu, 26 Apr 2007 15:56:03 +0000 (15:56 +0000)
committerJan Rękorajski <baggins@pld-linux.org>
Thu, 26 Apr 2007 15:56:03 +0000 (15:56 +0000)
svn-id: @8473

14 files changed:
ppp/ip-down.d/logger
ppp/ip-up.d/logger
rc.d/init.d/cpusets
rc.d/init.d/network
rc.d/rc.sysinit
run-parts
service
sysconfig/hwprofiles/Makefile.am
sysconfig/interfaces/down.d/ppp/logger
sysconfig/interfaces/up.d/ppp/logger
sysconfig/network-scripts/functions.network
sysconfig/network-scripts/ifdown
sysconfig/network-scripts/ifup
sysconfig/network-scripts/ifup-ipx

index 82f218377e31819abfe82a1bc9e65b8fd72b12b5..650467920dbf07cbbb0dc8ea85b10c7efd29673a 100644 (file)
@@ -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
index cb289ad7e022b4ea0b91d5f44304c1735900458c..21a3e43cd0dce497c72bfb6c8a8858961e0ee88d 100644 (file)
@@ -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
index 2fefb7d692eaf9641beffddf795308e9b4a22bff..5027ec94ad8dc00f5d3c36a0959bcc80c6fe7d2c 100644 (file)
@@ -123,12 +123,12 @@ cpuset_configs()
 }
 
 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 @@ case "$1" in
        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
index 09519dfe06da7bbd8e5587a5483231be17ef4d59..6242eb345221c08f8ac55d58a86784d1c46af5fb 100644 (file)
@@ -132,7 +132,7 @@ find_boot_interfaces() {
 
        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 @@ find_boot_interfaces() {
                                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 @@ find_boot_interfaces() {
                                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 @@ find_boot_interfaces() {
                                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 @@ find_boot_interfaces() {
                                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 @@ find_boot_interfaces() {
                                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() {
index 3106b1bc917cda7e131dfd65fb28d8aeb91e8ba7..1129482ab134271c764a28e9ba2b84208c3accb7 100755 (executable)
@@ -742,7 +742,7 @@ if ! is_yes "$VSERVER"; then
                        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
index 70ed7d4bfe76da6b873aea6a48878db1a52f88cf..531d792d2d30e92b6c01e8bf65e7f4a6130d88ae 100755 (executable)
--- a/run-parts
+++ b/run-parts
@@ -36,9 +36,9 @@ fi
 RUNPARTS_DIR=$1
 
 # assign absolute dir name
-olddir=`pwd`
+olddir=$(pwd)
 cd $RUNPARTS_DIR
-RUNPARTS_ADIR=`pwd`
+RUNPARTS_ADIR=$(pwd)
 cd $olddir
 unset olddir
 
diff --git a/service b/service
index e35d9129a74bf399eae592290039ba79dd714ad0..bca0d7f0728b937501bf8bed4a5c1ac39b8ccf6e 100755 (executable)
--- a/service
+++ b/service
@@ -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=
index 6149d2b08fa2e67c32d2bfdfb3809d3f5d62068f..0b1ee25da3c0947d64b703dd9756cfdb99b232ba 100644 (file)
@@ -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)
index 82f218377e31819abfe82a1bc9e65b8fd72b12b5..650467920dbf07cbbb0dc8ea85b10c7efd29673a 100644 (file)
@@ -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
index cb289ad7e022b4ea0b91d5f44304c1735900458c..21a3e43cd0dce497c72bfb6c8a8858961e0ee88d 100644 (file)
@@ -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
index d6dcf2f1c1c8bc7b2002e5ee11c071cfd2e67e33..7754d73cd5148b206899a68600bf09c1da6a38c4 100644 (file)
@@ -171,7 +171,7 @@ static_rarp()
 
 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 @@ calcnetmask()
 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
index 838032ae02038c368ac6598bc48f756e14318f15..51160e75c8333966dde18b736d3372399c63a8de 100755 (executable)
@@ -101,7 +101,7 @@ fi
 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 @@ if is_yes $ETH_VLANS && `echo $DEVICE | grep -q ^eth` ; then
                /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
index ef8ad68495ae57fcf16c36b19e1c39e4afe2dae5..159313b4687653dddf83ba541a7c2be5680c0a6b 100755 (executable)
@@ -29,7 +29,7 @@ DEV=$1
        exit 1
 }
 
-if [ `id -u` != 0 ]; then
+if [ $(id -u) != 0 ]; then
        if [ -x /sbin/usernetctl ]; then
                exec /sbin/usernetctl $DEV up
        fi
index bf736bf9e742562adb486fecc5f93debcf030498..b67d79e1bf82c2aef666b3a930fa692f1b95d016 100755 (executable)
@@ -36,15 +36,15 @@ setup_ip_param
 # 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
This page took 0.320281 seconds and 4 git commands to generate.