blob: bf7d540cbe57b633b0e52f8f94c555f51682541e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
diff -ur --unidirectional-new-file skipsrc-1.0.orig/admin/skipif.sh work.new/admin/skipif.sh
--- skipsrc-1.0.orig/admin/skipif.sh Fri Oct 25 13:11:20 1996
+++ work.new/admin/skipif.sh Mon Mar 8 21:33:39 1999
@@ -4,30 +4,15 @@
#
# SKIP interface management utility
-os_release=`uname -r | sed 's/\..*//g'`
-os_name=`uname`
+PREFIX=@@PREFIX@@
+SKIP_BIN=${PREFIX}/bin
+SKIP_ETC=${PREFIX}/etc/skip
+
+ECHO=echo
+TAB=" "
+ECHO_NONL="echo -n"
-if [ $os_release = 5 ]; then
- SKIP_BIN=/opt/SUNWicg/bin
- SKIP_ETC=/etc/opt/SUNWicg/skip
- ECHO=/bin/echo
- TAB="\t"
- ECHO_NONL=$ECHO
- NO_NL="\c"
-else
- SKIP_BIN=/usr/skip/bin
- SKIP_ETC=/etc/skip
- ECHO=echo
- TAB=" "
- ECHO_NONL="echo -n"
-fi
-
-PATH=/bin:/usr/bin:/usr/sbin:/usr/ucb:/etc:$SKIP_BIN
-
-if [ $os_name != SunOS ]
-then
- PATH=/sbin:$PATH
-fi
+PATH=/bin:/usr/bin:/sbin:/usr/sbin:${SKIP_BIN}
export PATH
SKIPHOST=$SKIP_BIN/skiphost
@@ -40,14 +25,11 @@
SKIP_SAVE="skipif: saving configuration to $SKIP_ETC/acl."
SKIP_NOSKIPIF="skipif: no SKIP interface found"
-
# Get the list of the network interfaces -eclude loopback interfaces
#
get_if_list()
{
-
-iflist=`netstat -i |grep -v Name|grep -v Kernel |grep -v Iface| \
- sed -e "s/ \(.*\)//"|grep -v lo0|grep -v lo|uniq`
+iflist=`ifconfig -a | grep '^[a-z]' | awk -F: '{print $1}' | grep -v 'lo[0-9]'`
}
# List all the network interfaces status
|