Author: baggins
Date: Mon Mar  9 22:12:19 2009
New Revision: 10185

Modified:
   rc-scripts/trunk/rc.d/init.d/cryptsetup
   rc-scripts/trunk/rc.d/init.d/functions
   rc-scripts/trunk/rc.d/init.d/network
   rc-scripts/trunk/rc.d/rc.sysinit
   rc-scripts/trunk/sysconfig/network-scripts/functions.network
   rc-scripts/trunk/sysconfig/network-scripts/ifup
   rc-scripts/trunk/sysconfig/network-scripts/ifup-aliases
   rc-scripts/trunk/sysconfig/network-scripts/ifup-neigh
   rc-scripts/trunk/sysconfig/network-scripts/ifup-routes
   rc-scripts/trunk/sysconfig/network-scripts/ifup-vlan
   rc-scripts/trunk/sysconfig/network-scripts/tnldown
   rc-scripts/trunk/sysconfig/network-scripts/tnlup
Log:
- man grep, "Direct invocation as either egrep or fgrep is deprecated",
  use grep -F or grep -E


Modified: rc-scripts/trunk/rc.d/init.d/cryptsetup
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/cryptsetup     (original)
+++ rc-scripts/trunk/rc.d/init.d/cryptsetup     Mon Mar  9 22:12:19 2009
@@ -171,7 +171,7 @@
        ;;
   status)
        # this is way overkill, but at least we have some status output...
-       if fgrep -q dm_crypt /proc/modules; then
+       if grep -qF dm_crypt /proc/modules; then
                nls "dm-crypt module is loaded"
        else
                nls "dm-crypt module is not loaded"

Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions      (original)
+++ rc-scripts/trunk/rc.d/init.d/functions      Mon Mar  9 22:12:19 2009
@@ -121,7 +121,7 @@
 # empty lines and lines beginning with hash are ignored
 is_empty_file() {
        [ -s "$1" ] || return 0
-       egrep -vq "^(#|[[:blank:]]*$)" "$1" && return 1 || return 0
+       grep -vqE "^(#|[[:blank:]]*$)" "$1" && return 1 || return 0
 }
 
 # returns OK if $1 contains $2

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        Mon Mar  9 22:12:19 2009
@@ -48,7 +48,7 @@
        modprobe_net
 
        # Setup interfaces names
-       if [ -x /sbin/nameif -a -f /etc/mactab -a -x /usr/bin/wc ] && [ $(egrep 
-vs '^(#| *$)' /etc/mactab | wc -l) -gt 0 ]; then
+       if [ -x /sbin/nameif -a -f /etc/mactab -a -x /usr/bin/wc ] && [ $(grep 
-vsE '^(#| *$)' /etc/mactab | wc -l) -gt 0 ]; then
                run_cmd "Setting interfaces names (nameif)" /sbin/nameif
        fi
 

Modified: rc-scripts/trunk/rc.d/rc.sysinit
==============================================================================
--- rc-scripts/trunk/rc.d/rc.sysinit    (original)
+++ rc-scripts/trunk/rc.d/rc.sysinit    Mon Mar  9 22:12:19 2009
@@ -97,7 +97,7 @@
        local module
        # Loop over every line in modules file
        ( \
-               egrep -hv '^(#|[[:blank:]]*$)' /etc/modules 
/etc/modules.$kernel /etc/modules.$kerneleq 2>/dev/null
+               grep -hvE '^(#|[[:blank:]]*$)' /etc/modules 
/etc/modules.$kernel /etc/modules.$kerneleq 2>/dev/null
                echo '' # make sure there is a LF at the end
        ) | while read module args; do
                [ -z "$module" ] && continue
@@ -283,7 +283,7 @@
        if [ -f /etc/crypttab ] && ! is_empty_file /etc/crypttab; then
                # XXX might need modules dep
                # Device mapper & related initialization
-               if ! fgrep -q device-mapper /proc/devices; then
+               if ! grep -qF device-mapper /proc/devices; then
                        modprobe dm-mod
                fi
 
@@ -581,12 +581,12 @@
 
        if grep -q "^options sound dmabuf=1" "$MODULES_CONF" 2>/dev/null ; then
                RETURN=0
-               alias=$(/sbin/modprobe -c | egrep -s 
"^alias[[:space:]]+sound[[:space:]]+" 2>/dev/null | awk '{ print $3 }')
+               alias=$(/sbin/modprobe -c | grep -sE 
"^alias[[:space:]]+sound[[:space:]]+" 2>/dev/null | awk '{ print $3 }')
                if [ -n "$alias" -a "$alias" != "off" ] ; then
                        run_cmd "$(nls 'Loading sound module') ($alias)" 
modprobe -s $alias
                        RETURN=$?
                fi
-               alias=$(/sbin/modprobe -c | egrep -s 
"^alias[[:space:]]+sound-slot-0[[:space:]]+" 2>/dev/null | awk '{ print $3 }')
+               alias=$(/sbin/modprobe -c | grep -sE 
"^alias[[:space:]]+sound-slot-0[[:space:]]+" 2>/dev/null | awk '{ print $3 }')
                if [ -n "$alias" -a "$alias" != "off" ] ; then
                        run_cmd "$(nls 'Loading sound module') ($alias)" 
modprobe -s $alias
                        RETURN=$?

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        Mon Mar 
 9 22:12:19 2009
@@ -116,7 +116,7 @@
                                /sbin/ip rule add from $src nat $dst
                        done
                elif [ "$1" = "off" ]; then
-                       LC_ALL=C /sbin/ip route show table all | egrep 
"^nat[[:blank:]]" | while read nat dst via src args; do
+                       LC_ALL=C /sbin/ip route show table all | grep -E 
"^nat[[:blank:]]" | while read nat dst via src args; do
                                /sbin/ip rule del from $src nat $dst
                                /sbin/ip route del nat $dst via $src
                        done
@@ -183,12 +183,12 @@
        fi
 
        # Setup DEVICETYPE for special cases.
-       if echo ${DEVICE} | LC_ALL=C egrep -q '^[a-z0-9]+\.[0-9]+$'; then
+       if echo ${DEVICE} | LC_ALL=C grep -qE '^[a-z0-9]+\.[0-9]+$'; then
                DEVICETYPE=vlan
        fi
 
        # real name of device (ie. is eth0 for eth0,eth0:1,eth0:alias)
-       SUBDEVICE=$(echo "$DEVICE" | egrep "([0-9]+:[0-9]+)")
+       SUBDEVICE=$(echo "$DEVICE" | grep -E "([0-9]+:[0-9]+)")
        DEVICE=$(echo $DEVICE | awk ' { gsub(/:.*$/,NUL); print $0 } ')
 
        eval IP4ADDR="\$IPADDR${IP4_PRIM_IF:-}"
@@ -317,11 +317,11 @@
 
        if [ -f /etc/sysconfig/static-routes ]; then
                if [ "$1" = "on" -o "$1" = "yes" ] ; then
-                       egrep "^(none|any)[[:blank:]]" 
/etc/sysconfig/static-routes | while read device args; do
+                       grep -E "^(none|any)[[:blank:]]" 
/etc/sysconfig/static-routes | while read device args; do
                                /sbin/ip route add $args
                        done
                else
-                       egrep "^(none|any)[[:blank:]]" 
/etc/sysconfig/static-routes | while read device args; do
+                       grep -E "^(none|any)[[:blank:]]" 
/etc/sysconfig/static-routes | while read device args; do
                                /sbin/ip route del $args 2>/dev/null
                        done
                fi
@@ -446,11 +446,11 @@
 
        if [ -f /etc/sysconfig/static-routes ] ; then
                if is_yes "$1"; then
-                       egrep 
"^(from|to|iif|tos|fwmark|dev|pref|priority|prio)[[:blank:]]" 
/etc/sysconfig/static-routes | while read args; do
+                       grep -E 
"^(from|to|iif|tos|fwmark|dev|pref|priority|prio)[[:blank:]]" 
/etc/sysconfig/static-routes | while read args; do
                                /sbin/ip rule add $args
                        done
                elif is_no "$1"; then
-                       LC_ALL=C /sbin/ip rule show | egrep -v -e "from all 
lookup (main|default|local) \$" -e " map-to " | while read prio from src args; 
do
+                       LC_ALL=C /sbin/ip rule show | grep -vE -e "from all 
lookup (main|default|local) \$" -e " map-to " | while read prio from src args; 
do
                                [ "$src" = "all" ] && ip rule delete $args || 
ip rule delete $from $src $args
                        done
                fi

Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup     (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup     Mon Mar  9 22:12:19 2009
@@ -178,7 +178,7 @@
        # IPv4 in use ?
        if is_yes "$IPV4_NETWORKING" && [ -n "${IP4ADDR}" ]; then
                # If broadcast is missing then autocalculate it
-               if ! (echo $IP4ADDROPT | egrep -q "brd|broadcast"); then
+               if ! (echo $IP4ADDROPT | grep -qE "brd|broadcast"); then
                        IP4ADDROPT="brd + ${IP4ADDROPT}"
                fi
 

Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup-aliases
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup-aliases     (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup-aliases     Mon Mar  9 
22:12:19 2009
@@ -13,13 +13,13 @@
        [ -z "$IP_ADDR" ] && continue
        # Be sure that primary address is added
        if [ "$IP_ADDR" = "$IP4ADDR" -o "$IP_ADDR" = "$IP6ADDR" ]; then
-               if (ip addr show dev $DEVICE | egrep -q 
"[[:space:]]${IP_ADDR}[[:space:]]"); then
+               if (ip addr show dev $DEVICE | grep -qE 
"[[:space:]]${IP_ADDR}[[:space:]]"); then
                        continue
                fi
        fi
        if is_yes "${IPV4_NETWORKING}"; then
                # If broadcast is missing then autocalculate it
-               if ! (echo $IP_ADDR_OPT | egrep -q "brd|broadcast"); then
+               if ! (echo $IP_ADDR_OPT | grep -qE "brd|broadcast"); then
                        IP_ADDR_OPT="brd + ${IP_ADDR_OPT}"
                fi
                ip -4 addr add ${IP_ADDR} dev ${DEVICE} ${IP_ADDR_OPT}
@@ -33,7 +33,7 @@
        [ -z "$IP_ADDR" ] && continue
        # Be sure that primary address is added
        if [ "$IP_ADDR" = "$IP4ADDR" -o "$IP_ADDR" = "$IP6ADDR" ]; then
-               if (ip addr show dev $DEVICE | egrep -q 
"[[:space:]]${IP_ADDR}[[:space:]]"); then
+               if (ip addr show dev $DEVICE | grep -qE 
"[[:space:]]${IP_ADDR}[[:space:]]"); then
                        continue
                fi
        fi
@@ -44,7 +44,7 @@
                fi
        elif is_yes "${IPV4_NETWORKING}"; then
                # If broadcast is missing then autocalculate it
-               if ! (echo $IP_ADDR_OPT | egrep -q "brd|broadcast"); then
+               if ! (echo $IP_ADDR_OPT | grep -qE "brd|broadcast"); then
                        IP_ADDR_OPT="brd + ${IP_ADDR_OPT}"
                fi
                ip -4 addr add ${IP_ADDR} dev ${DEVICE} ${IP_ADDR_OPT}
@@ -60,7 +60,7 @@
 
        # Be sure that primary address is added
        if [ "$IP_ADDR" = "$IP4ADDR" -o "$IP_ADDR" = "$IP6ADDR" ]; then
-               if (ip addr show dev $DEVICE | egrep -q 
"[[:space:]]${IP_ADDR}[[:space:]]"); then
+               if (ip addr show dev $DEVICE | grep -qE 
"[[:space:]]${IP_ADDR}[[:space:]]"); then
                        continue
                fi
        fi
@@ -71,7 +71,7 @@
                fi
        elif is_yes "${IPV4_NETWORKING}"; then
                # If broadcast is missing then autocalculate it
-               if ! (echo $IP_ADDR_OPT | egrep -q "brd|broadcast"); then
+               if ! (echo $IP_ADDR_OPT | grep -qE "brd|broadcast"); then
                        IP_ADDR_OPT="brd + ${IP_ADDR_OPT}"
                fi
                ip -4 addr add ${IP_ADDR} dev ${DEVICE} ${IP_ADDR_OPT}

Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup-neigh
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup-neigh       (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup-neigh       Mon Mar  9 
22:12:19 2009
@@ -14,7 +14,7 @@
 fi
 
 # note the trailing white space character in the grep gets rid of aliases
-egrep "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-arp | while read iface 
mac ip state args; do
+grep -E "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-arp | while read 
iface mac ip state args; do
        [ -z "$state" ] && state="stale"
        /sbin/ip neigh replace $ip lladdr $mac nud $state dev $DEVICE
 done

Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup-routes
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup-routes      (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup-routes      Mon Mar  9 
22:12:19 2009
@@ -10,7 +10,7 @@
 fi
 
 # note the trailing white space character in the grep gets rid of aliases
-egrep "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-routes | while read 
device args; do
+grep -E "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-routes | while read 
device args; do
        if [[ "$args" = *:* ]]; then
                if is_no "$IPV6_NETWORKING"; then
                        continue

Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup-vlan
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup-vlan        (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup-vlan        Mon Mar  9 
22:12:19 2009
@@ -45,7 +45,7 @@
        exit 1
 fi
 
-if ! egrep -ql "ONBOOT=[^n][^o]" /etc/sysconfig/interfaces/ifcfg-${VLAN_DEV}; 
then
+if ! grep -qlE "ONBOOT=[^n][^o]" /etc/sysconfig/interfaces/ifcfg-${VLAN_DEV}; 
then
        # XXX: maybe display some message? Right now disabling VLAN_DEV means 
disabling
        # VLANs, too. --misiek
        exit 1

Modified: rc-scripts/trunk/sysconfig/network-scripts/tnldown
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/tnldown  (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/tnldown  Mon Mar  9 22:12:19 2009
@@ -31,9 +31,9 @@
        exit 1
 }
 
-TNLCONFIGS=$(LC_ALL=C ls /etc/sysconfig/interfaces/tnlcfg-* 2>/dev/null | 
egrep -v '~$')
-TNLCONFIGS=$(egrep -L '^#!' $TNLCONFIGS)
-CONFIG=$(egrep -l "^DEVICE=[\"\']*$DEV[\"\']*\$" $TNLCONFIGS)
+TNLCONFIGS=$(LC_ALL=C ls /etc/sysconfig/interfaces/tnlcfg-* 2>/dev/null | grep 
-vE '~$')
+TNLCONFIGS=$(grep -LE '^#!' $TNLCONFIGS)
+CONFIG=$(grep -lE "^DEVICE=[\"\']*$DEV[\"\']*\$" $TNLCONFIGS)
 
 if [ -z "$CONFIG" ]; then
        CONFIG="$DEV"

Modified: rc-scripts/trunk/sysconfig/network-scripts/tnlup
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/tnlup    (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/tnlup    Mon Mar  9 22:12:19 2009
@@ -31,9 +31,9 @@
        exit 1
 }
 
-TNLCONFIGS=$(LC_ALL=C ls /etc/sysconfig/interfaces/tnlcfg-* 2>/dev/null | 
egrep -v '~$')
-TNLCONFIGS=$(egrep -L '^#!' $TNLCONFIGS)
-CONFIG=$(egrep -l "^DEVICE=[\"\']*$DEV[\"\']*\$" $TNLCONFIGS)
+TNLCONFIGS=$(LC_ALL=C ls /etc/sysconfig/interfaces/tnlcfg-* 2>/dev/null | grep 
-vE '~$')
+TNLCONFIGS=$(grep -LE '^#!' $TNLCONFIGS)
+CONFIG=$(grep -lE "^DEVICE=[\"\']*$DEV[\"\']*\$" $TNLCONFIGS)
 
 if [ -z "$CONFIG" ]; then
        CONFIG="$DEV"
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to