]> git.pld-linux.org Git - packages/arpwatch.git/commitdiff
- setting of per interface local networks
authorankry <ankry@pld-linux.org>
Sat, 1 Nov 2003 20:34:59 +0000 (20:34 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    arpwatch.init -> 1.22
    arpwatch.sysconfig -> 1.4

arpwatch.init
arpwatch.sysconfig

index f72c0f163986547d26d0fd0b972d0d376b1241ff..2c26acee24ad3bf750d1957f2397387b5a1aa48b 100644 (file)
@@ -12,7 +12,7 @@
 . /etc/sysconfig/network
 
 # Initial values
-OPTIONS=""
+GLOBAL_OPTIONS=""
 
 # Get service config
 [ -f /etc/sysconfig/arpwatch ] && . /etc/sysconfig/arpwatch
@@ -27,12 +27,12 @@ else
        exit 0
 fi
 
-if [ "${NO_BOGON}" = "yes" ]; then
-       OPTIONS="-N"
+if is_yes "${NO_BOGON}"; then
+       GLOBAL_OPTIONS="-N"
 else
        if [ -n "${LOCAL_NETWORKS}" ]; then
                for i in ${LOCAL_NETWORKS}; do
-                       OPTIONS="$OPTIONS -n $i"
+                       GLOBAL_OPTIONS="$GLOBAL_OPTIONS -n $i"
                done
        fi
 fi
@@ -53,6 +53,15 @@ case "$1" in
                        msg_starting "arpwatch ($IFC)"
                        touch /var/lib/arpwatch/$IFC.dat
                        chown 2:2 /var/lib/arpwatch/$IFC.dat
+                       OPTIONS="$GLOBAL_OPTIONS"
+                       if ! is_yes "${NO_BOGON}"; then
+                               eval IF_LOCAL_NETWORKS=\$${IFC}_LOCAL_NETWORKS
+                               if [ -n "${IF_LOCAL_NETWORKS}" ]; then
+                                       for i in ${IF_LOCAL_NETWORKS}; do
+                                               OPTIONS="$OPTIONS -n $i"
+                                       done
+                               fi
+                       fi
                        daemon arpwatch $NETWORKS -i $IFC -f /var/lib/arpwatch/$IFC.dat -u daemon $OPTIONS
                        RETVAL=$?
                        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/arpwatch
index 38bc682dac2c4d8a485efa08226400532ae2fb4e..48e5615832d2532c76bf83a94f2a9ee22838e6d4 100644 (file)
@@ -11,4 +11,8 @@ INTERFACES=
 # Additional local networks - usefull to avoid bogus bogons messages. You
 # can add here networks that are _not_ in your networks on interfaces.
 # Works only when NO_BOGON is not set. Multiple networks can be set here.
+# Globally
 LOCAL_NETWORKS=""
+# or per interface
+#eth0_LOCAL_NETWORKS=""
+#eth1_LOCAL_NETWORKS=""
This page took 0.101426 seconds and 4 git commands to generate.