]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- is_yes and is_no cleanups
authorwaszi <waszi@pld-linux.org>
Mon, 12 Jun 2000 08:38:15 +0000 (08:38 +0000)
committerwaszi <waszi@pld-linux.org>
Mon, 12 Jun 2000 08:38:15 +0000 (08:38 +0000)
- typos

svn-id: @760

14 files changed:
ppp/ip-down
rc.d/init.d/allowlogin
rc.d/init.d/functions.network
rc.d/init.d/network
rc.d/rc.sysinit
sysconfig/network-scripts/ifdown-sl
sysconfig/network-scripts/ifup
sysconfig/network-scripts/ifup-aliases
sysconfig/network-scripts/ifup-plip
sysconfig/network-scripts/ifup-post
sysconfig/network-scripts/ifup-ppp
sysconfig/network-scripts/ifup-sl
sysconfig/network-scripts/tnldown
sysconfig/network-scripts/tnlup

index c789c9ac64b060e15bc4c50bdb99cea1c556cd3f..f1261730b14e73caf62ad7001e388745b177b161 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $Id: ip-down,v 1.5 2000/05/07 19:00:00 siefca Exp $
+# $Id: ip-down,v 1.6 2000/06/12 08:38:14 waszi Exp $
 # This file should not be modified
 #
 # This script is run by the pppd _after_ the link is brought down.
@@ -43,7 +43,7 @@ export PPP_TTYNAME
 
 # Main Script starts here
 
-run-parts /etc/sysconfig/interfaces/down.d
+run-parts /etc/sysconfig/interfaces/down.d/ppp
 
 /etc/sysconfig/network-scripts/ifdown-post "${CONFIG}"
 
index 5e93b307c064927f4383a617523b102abe784e85..1fae259602c6b1aa648f3c365bdc15b4f2fec787 100644 (file)
@@ -4,7 +4,7 @@
 #
 # description: Allow users to login.
 #
-# $Id: allowlogin,v 1.7 1999/12/15 18:41:07 misiek Exp $
+# $Id: allowlogin,v 1.8 2000/06/12 08:38:15 waszi Exp $
 
 # NLS
 NLS_DOMAIN="rc-scripts"
@@ -19,13 +19,13 @@ NLS_DOMAIN="rc-scripts"
 # See how we were called.
 case "$1" in
   start)
-       if [ "$DELAY_LOGIN" = "yes" -a -f /etc/nologin.boot ]; then
+       if is_yes "$DELAY_LOGIN" && [ -f /etc/nologin.boot ]; then
                run_cmd "Allowing users to login" rm -f /etc/nologin /etc/nologin.boot
        fi
         ;;
   stop)
        # /etc/nologin when shutting down system
-       if [ "$DELAY_LOGIN" = "yes" -a ! -f /etc/nologin ]; then
+       if is_yes "$DELAY_LOGIN" && [ ! -f /etc/nologin ]; then
                nls "System shutdown in progress \n" > /etc/nologin
                chmod 644 /etc/nologin
                cp -fp /etc/nologin /etc/nologin.boot
index c0a53db3657624253ea0fa5fc2afd673ab7943c8..5a3f46020761ead99dbaa3bed666d5589fc3bf76 100755 (executable)
@@ -1,5 +1,5 @@
 #
-# $Id: functions.network,v 1.42 2000/04/21 17:43:01 jajcus Exp $
+# $Id: functions.network,v 1.43 2000/06/12 08:38:15 waszi Exp $
 # 
 # This is not a shell script; it provides functions to network scripts
 # that source it.
@@ -7,7 +7,7 @@
 # This will work only after starting interface to which LDAP server is connected
 find_ldap_interfaces()
 {
-[ "$USE_LDAP" = "yes" -a -x /usr/bin/ldapsearch ] || exit 1
+is_yes "$USE_LDAP" && [ -x /usr/bin/ldapsearch ] || exit 1
 if [ -n "$LDAP_BASE_DN" ] ; then
        BSWITCH="-b$LDAP_BASE_DN" 
 else
@@ -22,7 +22,7 @@ ldapsearch "$BSWITCH" "$QUERY" if_device | \
 # find aliases for device
 find_ldap_aliases()
 {
-[ "$USE_LDAP" = "yes" -a -x /usr/bin/ldapsearch ] || exit 1
+is_yes "$USE_LDAP" && [ -x /usr/bin/ldapsearch ] || exit 1
 if [ -n "$LDAP_BASE_DN" ] ; then
        BSWITCH="-b$LDAP_BASE_DN" 
 else
@@ -36,7 +36,7 @@ ldapsearch "$BSWITCH" "$QUERY" if_device | \
 
 get_ldap_config ()
 {
-if [ "$USE_LDAP" = "yes" -a -x /usr/bin/ldapsearch ]; then
+if is_yes "$USE_LDAP" && [ -x /usr/bin/ldapsearch ]; then
        exit 1
 fi
 
@@ -87,7 +87,7 @@ if echo "$CONFIG"|egrep "^/" >/dev/null 2>&1 ; then
        fi
 elif [ -f "/etc/sysconfig/interfaces/$CONFIG" ] ; then
        . "/etc/sysconfig/interfaces/$CONFIG"
-elif [ "$USE_LDAP" = "yes" ] ; then
+elif is_yes "$USE_LDAP"; then
        eval `get_ldap_config $DEVNAME`
 fi
 }
@@ -159,9 +159,9 @@ fi
 # network router discovery daemon
 rdisc()
 {
-if [ "$IPV6_NETWORKING" = "yes" ]; then
+if is_yes "$IPV6_NETWORKING"; then
   [ -z "$IPV6_RDISC_MODE" ] && IPV6_RDISC_MODE=host
-  if [ "$IPV6_RDISC" = "on" -o "$IPV6_RDISC" = "yes" ]; then
+  if is_yes "$IPV6_RDISC"; then
   RDISC_OPTS="-fs"
        case "$1" in
        on|start)
@@ -197,8 +197,8 @@ eval VARD=\$${VAR}
 
 if [ -n "$VARD" -a -e /proc/sys/net/$WHAT ]; then
        if [ "$TODO" = "start" ]; then
-               [ "$VARD" = "no" -a "$SET" = "1" ] && SET="$(($SET - 1))"
-               [ "$VARD" = "yes" -a "$SET" = "0" ] && SET="$(($SET + 1))"
+               is_no "$VARD" && [ "$SET" = "1" ] && SET="$(($SET - 1))"
+               is_yes "$VARD" && [ "$SET" = "0" ] && SET="$(($SET + 1))"
                if [ -n "$MESSAGE" ]; then
                        show "`nls "Setting %s to %s" "$MESSAGE" "$SET"`"; busy
                        if (echo "$SET" > /proc/sys/net/$WHAT) 2> /dev/null; then
@@ -232,7 +232,7 @@ if [ "$IPV4_DYNAMIC_IP_PATCH" != "default" -a -n "$IPV4_DYNAMIC_IP_PATCH" ] ||
                *)      IPV4_DYNAMIC_IP_PATCH_VALUE=7 ;;
        esac
 
-       if [ "$IPV4_DYNAMIC_IP_PATCH" = "yes" -a "$1" = "on" ]; then
+       if is_yes "$IPV4_DYNAMIC_IP_PATCH" && [ "$1" = "on" ]; then
                show "Enabling dynamic IP patch"
                busy
                if echo $IPV4_DYNAMIC_IP_PATCH_VALUE > /proc/sys/net/ipv4/ip_dynaddr; then
@@ -260,7 +260,7 @@ ipv4_local_port_range()
 {
 if [ "$IPV4_LOCAL_PORT_RANGE" != "default" -a -n "$IPV4_LOCAL_PORT_RANGE" ] || \
    [ ! -e /proc/sys/net/ipv4/ip_local_port_range ]; then
-       if [ "$IPV4_LOCAL_PORT_RANGE" = "yes" -a "$1" = "on" ]; then
+       if is_yes "$IPV4_LOCAL_PORT_RANGE" && [ "$1" = "on" ]; then
                show "Setting local port range"; busy
                if echo "$IPV4_LOCAL_PORT_RANGE" > /proc/sys/net/ipv4/ip_local_port_range; then
                        deltext
@@ -286,7 +286,7 @@ ipv4_anti_spoofing()
 {
 if [ "$IPV4_ANTI_SPOOFING" != "default" -a -n "$IPV4_ANTI_SPOOFING" ] || \
    [ ! -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
-       if [ "$IPV4_ANTI_SPOOFING" = "yes" -a "$1" = "on" ]; then
+       if is_yes "$IPV4_ANTI_SPOOFING" && [ "$1" = "on" ]; then
                show "Setting up IP spoofing protection"; busy
                if (for f in /proc/sys/net/ipv4/conf/*/rp_filter; do echo 1 > $f; done); then
                        deltext
@@ -343,7 +343,7 @@ ip link set dev lo down
 
 static_arp()
 {
-if [ "$STATIC_ARP" = "yes" ]; then
+if is_yes "$STATIC_ARP"; then
        if [ -r /etc/ethers -a -x /sbin/arp ]; then
                /sbin/arp -f /etc/ethers
        fi
@@ -352,8 +352,7 @@ fi
 
 modprobe_net()
 {
-if [ "$IPV6_NETWORKING" = "yes" -a  \
-     "`ls -R /lib/modules/\`uname -r\`/ | grep ipv6.o`" != "" ]; then
+if is_yes "$IPV6_NETWORKING" && [ "`ls -R /lib/modules/\`uname -r\`/ | grep ipv6.o`" != "" ]; then
        modprobe -s -k net-pf-10
 fi
 }
index 9cbc8371f9c6e099ae8c5ee67134fdc0d6c35b0c..2d2e34016511c29245e5380677a849f6af561a13 100644 (file)
@@ -8,7 +8,7 @@
 #
 # probe:       true
 
-# $Id: network,v 1.33 2000/04/03 14:50:46 baggins Exp $
+# $Id: network,v 1.34 2000/06/12 08:38:15 waszi Exp $
 
 # NLS
 NLS_DOMAIN="rc-scripts"
@@ -22,7 +22,7 @@ NLS_DOMAIN="rc-scripts"
 . /etc/sysconfig/network
 
 # Check that networking is up.
-[ "${NETWORKING}" = "no" -o "${NETWORKING}" = "" ] && exit 0
+is_no "${NETWORKING}" && exit 0
 
 [ -x /sbin/ip ] || exit 0
 
@@ -55,21 +55,17 @@ setup_nat on
 setup_routes on
 
 # Setup IPX
-case "$IPX" in
-    yes|true)
+if is_yes "$IPX"; then
        if [ ! -z $IPXAUTOPRIMARY ] ; then
-           /usr/bin/ipx_configure --auto_primary=$IPXAUTOPRIMARY
+               /usr/bin/ipx_configure --auto_primary=$IPXAUTOPRIMARY
        fi
        if [ ! -z $IPXAUTOFRAME ] ; then
-           /usr/bin/ipx_configure --auto_interface=$IPXAUTOFRAME
+               /usr/bin/ipx_configure --auto_interface=$IPXAUTOFRAME
        fi
        if [ ! -z "$IPXINTERNALNETNUM" -a "$IPXINTERNALNETNUM" != "0" ]; then
-           /usr/bin/ipx_internal_net add $IPXINTERNALNETNUM $IPXINTERNALNODENUM
+               /usr/bin/ipx_internal_net add $IPXINTERNALNETNUM $IPXINTERNALNODENUM
        fi
-    ;;
-    *)
-    ;;
-esac
+fi
 }
 
 network_postinit()
@@ -113,7 +109,7 @@ TODO="$1"
 # IPv4 forwarding
 proc_net ipv4/ip_forward $TODO 1 0 IPV4_FORWARDING "IPv4 forwarding"
 # IPv6 forwarding
-if [ "$IPV6_NETWORKING" = "yes" ]; then
+if is_yes "$IPV6_NETWORKING"; then
    proc_net ipv6/conf/all/forwarding $TODO 1 0 IPV6_FORWARDING "IPv6 forwarding"
 fi
 # Others proc/net
index 3d629657177d2e3e28444f69ca1bb96862c32d18..7ac17ade4580e28aa0a441a73cae531a0c7ad806 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # /etc/rc.d/rc.sysinit - run once at boot time
-# $Id: rc.sysinit,v 1.64 2000/06/02 10:00:12 zagrodzki Exp $
+# $Id: rc.sysinit,v 1.65 2000/06/12 08:38:14 waszi Exp $
 #
 # Taken in part from Miquel van Smoorenburg's bcheckrc.
 # Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
@@ -212,7 +212,7 @@ fi
 
 # set up pnp 
 if [ -x /sbin/isapnp -a -f /etc/isapnp/isapnp.conf ]; then
-       if [ -n "$PNP" -a "$RUN_ISAPNP" = "yes" ]; then
+       if [ -n "$PNP" ] && is_yes "$RUN_ISAPNP"; then
                run_cmd "Setting up ISA PNP devices" /sbin/isapnp /etc/isapnp/isapnp.conf
        fi
 fi
@@ -229,7 +229,7 @@ fi
 # /etc/nologin when starting system
 [ -f /etc/nologin.boot ] && rm -f /etc/nologin /etc/nologin.boot
 
-if [ "$DELAY_LOGIN" = "yes" -a ! -f /etc/nologin ]; then
+if is_yes "$DELAY_LOGIN" && [ ! -f /etc/nologin ]; then
        show "Enabling Delay Login"; busy
        echo > /etc/nologin
        nls "System bootup in progress  - please wait" >> /etc/nologin
@@ -298,7 +298,7 @@ if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
 fi
 
 # load sound modules
-if [ -n "$USEMODULES" -a "$LOAD_SOUND" = "yes" ]; then
+if [ -n "$USEMODULES" ] && is_yes "$LOAD_SOUND"; then
        if grep -s -q "^alias sound-slot-0" /etc/modules.conf ; then
                run_cmd "Loading sound module" modprobe -s sound-slot-0
        fi
index 0ed23eb12e65ffddf75e81057385b9d2467ecc1c..ae60b0dce5f846938337cdf79383ec871a9bcc0d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifdown-sl,v 1.9 1999/10/13 21:28:40 kloczek Exp $
+#      $Id: ifdown-sl,v 1.10 2000/06/12 08:38:15 waszi Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
@@ -15,7 +15,7 @@ source_config
 rm -f /var/run/sl-$DEVICE.dev
 
 # we can use dip or direct slip connection via slattach
-if [ "$DIRECT_CONNECT" != "yes" ]; then
+if is_no "$DIRECT_CONNECT"; then
 PID=`pidof dip-$DEVICE`
 else
 PID=`pidof slattach`
index c4d0b72bcaf7646d40501461a3edc6c84c929176..99ad366b67aa37520bf6d2f97ca28aff8a2cd2ed 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifup,v 1.41 2000/05/29 19:37:06 baggins Exp $
+#      $Id: ifup,v 1.42 2000/06/12 08:38:15 waszi Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
@@ -33,7 +33,7 @@ fi
 
 source_config
 
-if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]; then
+if [ "foo$2" = "fooboot" ] && is_no "${ONBOOT}"; then
     exit
 fi
 
@@ -53,7 +53,7 @@ else
 fi
 
 # Old BOOTP variable
-if [ "$BOOTP" = "yes" ]; then
+if is_yes "$BOOTP"; then
     BOOTPROTO=bootp
 fi
 
@@ -88,12 +88,12 @@ if [ -z "$NETMASK" -a -n "$PREFIX" ]; then
        NETMASK="`calcnetmask $PREFIX`"
 fi
 
-[ "$MULTICAST" = "yes" ] && MULTICAST=on               || MULTICAST=off
+is_yes "$MULTICAST"      && MULTICAST=on               || MULTICAST=off
 [ -n "$SRC_ADDR" ]       && SRC_ADDR="src ${SRC_ADDR}" || SRC_ADDR=""
 [ -n "$SCOPE" ]          && SCOPE="scope ${SCOPE}"     || SCOPE=""
 
 if [ "$ARP" ]; then
-       [ "$ARP" = "yes" ]      && ARP=on       || ARP=off
+       is_yes "$ARP"    && ARP=on      || ARP=off
 elif [ "$DEVICETYPE" = "eth" ]; then
        ARP=on
 else
@@ -181,7 +181,7 @@ else
 
 
     # IPv6 rules
-    if [ "${IPV6_NETWORKING}" = "yes" ] ; then
+    if is_yes "${IPV6_NETWORKING}"; then
 
       for ADDR6 in ${IPV6_ADDR} ; do
        ip -family inet6 addr add ${ADDR6} dev ${DEVICE} label ${FULLDEVNAME}
@@ -219,7 +219,7 @@ else
     fi
 fi
 
-if [ "$IPX" = "yes" ]; then
+if is_yes "$IPX"; then
        /etc/sysconfig/network-scripts/ifup-ipx $DEVICE
 fi
 
index 8aaf3ba07e6d500cb4f8d68fb9745720d263edff..2cec903b1d9c83f1df3a92372050290d001f732c 100755 (executable)
@@ -1,10 +1,11 @@
 #!/bin/sh
 #
-#      $Id: ifup-aliases,v 1.9 1999/10/13 21:28:40 kloczek Exp $
+#      $Id: ifup-aliases,v 1.10 2000/06/12 08:38:15 waszi Exp $
 #
 # adds aliases of device $1
 
 . /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
 . /etc/sysconfig/network-scripts/.functions
 
 if [ "$1" = "" ]; then
index 7ffe64bb62eaa0b479410912b0e27282220fa6df..e691d936b520ec39c572fb184eea4d550cd13a2f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifup-plip,v 1.9 1999/10/13 21:28:40 kloczek Exp $
+#      $Id: ifup-plip,v 1.10 2000/06/12 08:38:15 waszi Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
@@ -10,8 +10,7 @@ cd /etc/sysconfig/network-scripts
 CONFIG=$1
 source_config
 
-if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]
-then
+if [ "foo$2" = "fooboot" ] && is_no "${ONBOOT}"; then
        exit
 fi
 
index a2780e2b1df8fb051ab925471639b91abf6077b1..35e6b10e3f853cd03a6a23a1f1a7c90b58394385 100755 (executable)
@@ -1,10 +1,11 @@
 #!/bin/sh
 #
-#      $Id: ifup-post,v 1.20 2000/04/21 17:45:24 jajcus Exp $
+#      $Id: ifup-post,v 1.21 2000/06/12 08:38:15 waszi Exp $
 #
 
 run_up() { :; }
 
+. /etc/rc.d/init.d/functions
 . /etc/sysconfig/network
 . /etc/sysconfig/network-scripts/.functions
 
index 5374b14aed5fd2b37f1d957b897a31066ec1eda4..9eb188cbfdcc3840dc50e8163a413f3a0495fdbb 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifup-ppp,v 1.12 2000/04/23 11:46:04 marcus Exp $
+#      $Id: ifup-ppp,v 1.13 2000/06/12 08:38:15 waszi Exp $
 #
 # ifup-ppp script for pppd-2.3.5 (with persist & demand options) ver 0.2
 # Grzegorz Stanislawski <stangrze@open.net.pl>
@@ -27,7 +27,7 @@ CONFIG=$1
 source_config
 [ -z "$HOLDOFF" ] && HOLDOFF=30
 
-if [ "$2" = "boot" -a "${ONBOOT}" = "no" ]; then
+if [ "$2" = "boot" ] && is_no "${ONBOOT}"; then
   exit
 fi
 [ -x /usr/sbin/pppd ] || {
@@ -39,27 +39,27 @@ fi
 }
 
 opts="lock"
-if [ "${PERSIST}" = "yes" ]; then
+if is_yes "${PERSIST}"; then
   if [ -z "${MAXFAIL}" ]; then 
   MAXFAIL="0"
   fi
   opts="$opts persist holdoff $HOLDOFF maxfail $MAXFAIL"
 fi
-if [ "${DEMAND}" = "yes" ]; then
+if is_yes "${DEMAND}"; then
   if [ -z "${IDLE}" ]; then
   IDLE="0"
   fi
   opts="$opts demand idle ${IDLE}"
 fi
-if [ "${HARDFLOWCTL}" = yes ] ; then
+if is_yes "${HARDFLOWCTL}"; then
   opts="$opts modem crtscts"
 fi
-if [ "${ESCAPECHARS}" = yes ] ; then
+if is_yes "${ESCAPECHARS}"; then
   opts="$opts asyncmap FFFFFFFF"
 elif [ "${ESCAPECHARS}" = no ] ; then
   opts="$opts asyncmap 00000000"
 fi
-if [ "${DEFROUTE}" = yes ] ; then
+if is_yes "${DEFROUTE}" = yes; then
   opts="$opts defaultroute"
 fi
 if [ -n "${MRU}" ] ; then
@@ -78,7 +78,7 @@ fi
 if [ -n "${REMOTENAME}" ] ; then
   opts="$opts remotename ${REMOTENAME}"
 fi
-if [ "${DEBUG}" = yes ] ; then
+if is_yes "${DEBUG}"; then
   opts="$opts debug"
   chatdbg="-v"
 fi
index eb1c9bca7a734aa1051c09d2a3c33f37d7507c84..5bf8457760f00d9299d8b6ffd93f886b4736185a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifup-sl,v 1.15 1999/10/13 21:28:40 kloczek Exp $
+#      $Id: ifup-sl,v 1.16 2000/06/12 08:38:15 waszi Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
@@ -21,8 +21,7 @@ shift
 CONFIG=$1
 source_config
 
-if [ "foo$2" = "fooboot" -a ${ONBOOT} = "no" ]
-then
+if [ "foo$2" = "fooboot" ] && is_no ${ONBOOT}; then
   exit
 fi
 
@@ -36,7 +35,7 @@ if [ "`ls -R /lib/modules/\`uname -r\`/ | grep slip.o`" != "" ]; then
 fi
 
 # we can use dip or direct slip connection via slattach
-if [ "$DIRECT_CONNECT" != "yes" ]; then
+if is_no "$DIRECT_CONNECT"; then
 
 [ -x /usr/sbin/dip ] || {
   nls "/usr/sbin/dip does not exist or is not executable"
@@ -63,7 +62,7 @@ while : ; do
   (logger -p daemon.info -t ifup-sl \
     "`nls 'dip started for'` $DEVICE `nls 'on'` $MODEMPORT `nls 'at'` $LINESPEED" &)&
   doexec /usr/sbin/dip dip-$DEVICE $DIPSCRIPT
-  if [ "$PERSIST" != "yes" -o ! -f /var/run/sl-$DEVICE.dev ] ; then
+  if is_no "$PERSIST" || [ ! -f /var/run/sl-$DEVICE.dev ] ; then
     exit 0
   fi
   rm -f /var/run/sl-$DEVICE.dev
@@ -99,7 +98,7 @@ else
         ip -family inet addr add $IPADDR peer $REMIP dev $DEVICE
 
         # Set defaultroute
-        if [ "$DEFROUTE" = "yes" ]; then
+        if is_yes "$DEFROUTE"; then
                ip -family inet route add default dev $DEVICE
          fi
 
index d93a327acc139bd672c8b52e6567faf7b15c4e38..cec5b173a028cc419845ac7554e32a0ede489a71 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: tnldown,v 1.14 2000/03/31 13:10:22 misiek Exp $
+#      $Id: tnldown,v 1.15 2000/06/12 08:38:15 waszi Exp $
 #
 # Author: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
@@ -33,9 +33,9 @@ fi
 
 source_config
 
-[ "${IPV6_TUNNELCONFIG}" != "yes" -a "${MODE}" = "sit" ] && exit 0
-[ "${IPX}" != "yes" -a "${MODE}" = "ipxip" ] && exit 0
-[ "${IPX}" != "yes" -a "${MODE}" = "ipipx" ] && exit 0
+is_no "${IPV6_TUNNELCONFIG}" && [ "${MODE}" = "sit" ] && exit 0
+is_no "${IPX}" && [ "${MODE}" = "ipxip" ] && exit 0
+is_no "${IPX}" && [ "${MODE}" = "ipipx" ] && exit 0
 
 if [ "${MODE}" = "ipip" ] || [ "${MODE}" = "sit" ] || [ "${MODE}" = "gre" ]; then
 
index 6d6d6b313d40fa3a2c38833ac6aec011a72d35aa..f39940c05a2a44b1c811aab7750eec2c39a75c2e 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: tnlup,v 1.17 2000/03/31 13:10:22 misiek Exp $
+#      $Id: tnlup,v 1.18 2000/06/12 08:38:15 waszi Exp $
 #
 # Author: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
@@ -33,14 +33,13 @@ fi
 
 source_config
 
-if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]
-then
+if [ "foo$2" = "fooboot" ] && is_no "${ONBOOT}"; then
         exit
 fi
 
-[ "${IPV6_TUNNELCONFIG}" != "yes" -a "${MODE}" = "sit" ] && exit 0
-[ "${IPX}" != "yes" -a "${MODE}" = "ipxip" ] && exit 0
-[ "${IPX}" != "yes" -a "${MODE}" = "ipipx" ] && exit 0
+is_no "${IPV6_TUNNELCONFIG}" && [ "${MODE}" = "sit" ] && exit 0
+is_no "${IPX}" && [ "${MODE}" = "ipxip" ] && exit 0
+is_no "${IPX}" && [ "${MODE}" = "ipipx" ] && exit 0
 
 if [ "${MODE}" = "gre" -a "`ls -R /lib/modules/\`uname -r\`/ | grep ip_gre.o`" != "" ]; then
        modprobe -s -k ip_gre
@@ -54,30 +53,30 @@ fi
 [ -n "${TOS}" ] && TOS="tos ${TOS}"
 [ -n "${BIND_DEV}" ] && BIND_DEV="dev ${BIND_DEV}"
 
-if [ "${SEQ}" = "yes" ]; then
+if is_yes "${SEQ}"; then
        SEQ=seq
 else
-       [ "${ISEQ}" = "yes" ] && SEQ=iseq
-       [ "${OSEQ}" = "yes" ] && SEQ="${SEQ} oseq"
+       is_yes "${ISEQ}" && SEQ=iseq
+       is_yes "${OSEQ}" && SEQ="${SEQ} oseq"
 fi
 
-if [ "${CSUM}" = "yes" ]; then
+if is_yes "${CSUM}"; then
        CSUM=csum
 else
-        [ "${ICSUM}" = "yes" ] && CSUM=icsum
-        [ "${ICSUM}" = "yes" ] && CSUM="${SEQ} ocsum"
+        is_yes "${ICSUM}" && CSUM=icsum
+        is_yes "${ICSUM}" && CSUM="${SEQ} ocsum"
 fi
 
-[ "${ISEQ}" = "yes" ] && ISEQ=iseq
-[ "${ISEQ}" = "yes" ] && ISEQ=iseq
-[ "${ISEQ}" = "yes" ] && ISEQ=iseq
-[ "${ISEQ}" = "yes" ] && ISEQ=iseq
+is_yes "${ISEQ}" && ISEQ=iseq
+is_yes "${ISEQ}" && ISEQ=iseq
+is_yes "${ISEQ}" && ISEQ=iseq
+is_yes "${ISEQ}" && ISEQ=iseq
 
 [ "${TTL}" != "0" -a "${TTL}" != "inherit" ] && PMTUDISC=yes
 
-if [ "${PMTUDISC}" = "yes" ]; then
+if is_yes "${PMTUDISC}"; then
        PMTUDISC=pmtudisc
-elif [ "${PMTUDISC}" = "no" ]; then
+elif is_no "${PMTUDISC}"; then
        PMTUDISC=nopmtudisc
 fi
 
This page took 0.151588 seconds and 4 git commands to generate.