diff options
author | Archie Cobbs <archie@FreeBSD.org> | 1999-03-10 22:28:00 +0000 |
---|---|---|
committer | Archie Cobbs <archie@FreeBSD.org> | 1999-03-10 22:28:00 +0000 |
commit | d5879e7be65292eba69981545dddb13bf328f35e (patch) | |
tree | c1023bf38c7e83d53c072cc000da19efa98f7740 /security/skip/files/patch-bj | |
parent | Mention that packages for these kits can be gotten from www.freebsd.org/ports. (diff) |
Build SKIP port as a KLD instead of an LKM.
Notes
Notes:
svn path=/head/; revision=17133
Diffstat (limited to 'security/skip/files/patch-bj')
-rw-r--r-- | security/skip/files/patch-bj | 170 |
1 files changed, 146 insertions, 24 deletions
diff --git a/security/skip/files/patch-bj b/security/skip/files/patch-bj index fb1335eb21f3..e1649f6d01da 100644 --- a/security/skip/files/patch-bj +++ b/security/skip/files/patch-bj @@ -1,24 +1,146 @@ -diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/keymgrd/cdp_queue.C skipsrc-1.0/skip/keymgrd/cdp_queue.C ---- skipsrc-1.0.orig/skip/keymgrd/cdp_queue.C Fri Oct 25 13:12:47 1996 -+++ skipsrc-1.0/skip/keymgrd/cdp_queue.C Tue Dec 23 13:37:22 1997 -@@ -91,17 +91,17 @@ - - switch (kind) { - case RESOLVER_PING: -- skip_log(SKIP_NOTICE, "add_cdp_resolver(@) (bilateral)"); -+ skip_log(SKIP_INFO, "add_cdp_resolver(@) (bilateral)"); - break; - - case RESOLVER_TUNNEL: -- skip_log(SKIP_NOTICE, "add_cdp_resolver(=) (tunnel)"); -+ skip_log(SKIP_INFO, "add_cdp_resolver(=) (tunnel)"); - break; - - case RESOLVER_HOST: - if (parse_ip_address(&r.server, arg)) - return; -- skip_log(SKIP_NOTICE, "add_cdp_resolver(%s)", arg); -+ skip_log(SKIP_INFO, "add_cdp_resolver(%s)", arg); - break; - - default: +diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/rc work.new/skip/freebsd/rc +--- skipsrc-1.0.orig/skip/freebsd/rc Fri Oct 25 13:13:19 1996 ++++ work.new/skip/freebsd/rc Wed Mar 10 09:24:17 1999 +@@ -44,22 +44,30 @@ + + #pragma ident "@(#)rc 1.5 96/10/08 Sun Microsystems" + # +-PATH=/bin:/usr/bin:/sbin:/usr/ucb:/usr/etc +-SKIP_PATH=${SKIP_PATH-/usr/skip} +-SKIPD=/usr/skip/bin/skipd +-SKIP_HOST=/usr/skip/bin/skiphost +-SKIP_VAR_CMD=/usr/skip/bin/skipvar +-SKIP_SECURE_HOSTS=/etc/skip/hosts +-SKIP_ETC=/etc/skip +-SKIP_VAR=/var/skip ++ ++PATH=/bin:/usr/bin:/sbin:/usr/sbin ++PREFIX=@@PREFIX@@ ++ ++SKIP_BIN=${PREFIX}/bin ++SKIP_ETC=${PREFIX}/etc/skip ++SKIP_LKM=${PREFIX}/modules ++ ++SKIPD=${SKIP_BIN}/skipd ++SKIP_HOST=${SKIP_BIN}/skiphost ++SKIP_MKDEV=${SKIP_ETC}/skip.mkdev ++SKIP_SECURE_HOSTS=${SKIP_ETC}/hosts ++ ++SKIP_VAR=/var/tmp + VAR_SIZE=830 +-SKIP_REQ_FILES="$SKIP_PATH/drv/skip.o $SKIP_ETC/skip.mkdev" +-PSEUDO_DRVS="skip" ++ ++SKIP_MOD="skip.ko" ++SKIP_REQ_FILES="${SKIP_LKM}/${SKIP_MOD} ${SKIP_ETC}/skip.mkdev" + + verify_owner() + { + me=`whoami` + if [ $me != "root" ]; then ++ echo "" + echo "skip: this script must be run as root ... fatal error" + exit 1 + fi +@@ -68,6 +76,7 @@ + pre_checks() { + for FILE in $SKIP_REQ_FILES; do + if [ ! -f $FILE ]; then ++ echo "" + echo "skip: installation problem detected" + echo "skip: $FILE not found" + echo "skip: please refer to installation guide" +@@ -76,6 +85,7 @@ + done + + if [ ! -w $SKIP_VAR ]; then ++ echo "" + echo "skip: can not write to $SKIP_VAR" + exit 1 + fi +@@ -85,11 +95,12 @@ + + sync + +- DISK_AVAIL=`df $SKIP_VAR | awk 'NR==2 {x=$4} ++ DISK_AVAIL=`df -k $SKIP_VAR | awk 'NR==2 {x=$4} + NR==3 {x=$3} + END {print x}'` + + if [ $DISK_AVAIL -lt $VAR_SIZE ]; then ++ echo "" + echo "skip: not enough space available in $SKIP_VAR" + echo "skip: $VAR_SIZE kbytes will be required to run the product" + exit 1 +@@ -98,45 +109,47 @@ + + load_driver() + { +- modstat > $SKIP_VAR/modules +- +- # load pseudo-drivers +- for driver in $PSEUDO_DRVS; do ++ kldstat | awk '{ print $5 }' | grep ${SKIP_MOD} > /dev/null 2>&1 + +- awk '{ print $8 }' $SKIP_VAR/modules | grep $driver > /dev/null 2>&1 ++ if [ $? -ne 0 ]; then + +- if [ $? -eq 0 ]; then +- echo "skip: driver already loaded" +- else +- echo "skip: loading driver" +- modload -o $SKIP_VAR/$driver \ +- -p $SKIP_ETC/$driver.mkdev \ +- $SKIP_PATH/drv/$driver.o> /dev/null +- +- +- if [ $? -ne 0 ]; then +- echo "skip: failed to load driver" +- echo "skip: perhaps too many drivers are loaded?" +- exit 1 +- fi ++ # Load KLD ++ kldload ${SKIP_LKM}/${SKIP_MOD} > /dev/null ++ if [ $? -ne 0 ]; then ++ echo "" ++ echo "skip: failed to load driver" ++ exit 1 ++ fi + ++ # Absurd hack to find out device major number ++ DEV_MAJOR=`/sbin/dmesg | grep 'skip: device major=' | tail -1 | sed 's/^.*=\([0-9]\{1,\}\),.*$/\1/g'` ++ if [ "${DEV_MAJOR}" = "" ]; then ++ echo "" ++ echo "skip: can't determine skip device major number" ++ exit 1 + fi +- done ++ ++ # Create device nodes ++ ${SKIP_MKDEV} ${DEV_MAJOR} ++ fi ++ + } + + start_daemons() { + if [ -x $SKIPD ]; then +- echo -n "starting skip key manager daemon" +- $SKIPD > /var/log/skipd.log & +- echo "." ++ $SKIPD + fi + + if [ -x $SKIP_SECURE_HOSTS -a -x $SKIP_HOST ]; then +- $SKIP_SECURE_HOSTS >> /var/log/skipd.log 2>&1 & ++ $SKIP_SECURE_HOSTS >> /var/log/skiphost.log 2>&1 & + fi + } + + # main ++ ++# keep console output pretty ++echo -n " skip" ++ + verify_owner + pre_checks + load_driver |