1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-14 23:46:10 +00:00
freebsd-ports/security/skip/files/patch-ag

59 lines
1.4 KiB
Plaintext
Raw Normal View History

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