summaryrefslogtreecommitdiff
path: root/security/authpf/pkg-install
diff options
context:
space:
mode:
Diffstat (limited to 'security/authpf/pkg-install')
-rw-r--r--security/authpf/pkg-install85
1 files changed, 0 insertions, 85 deletions
diff --git a/security/authpf/pkg-install b/security/authpf/pkg-install
deleted file mode 100644
index 3c4b8c54494c..000000000000
--- a/security/authpf/pkg-install
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/sh
-# an installation script for pf_freebsd copied from Wnn6
-
-check_pw()
-{
- if which -s pw; then
- :
- else
- cat <<EOF
-
-This system looks like a pre-2.2 version of FreeBSD. We see that it
-is missing the "pw" utility. We need this utility. Please get and
-install it, and try again. You can get the source from:
-
- ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz
-
-EOF
- exit 1
- fi
-}
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" ]; then
- read -p "${question} (y/n) [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-check_group() {
- local name id
-
- name=$1
- id=$2
- #check
- # We need a command 'pw(8)'
- check_pw
- if pw groupshow -n $name > /dev/null ; then
- return 0
- fi
- if pw groupadd -g $id -n $name -N -q ; then
- echo ""
- echo "You need a group '$name' whose ID number is $id"
- if yesno "Would you like to create it automatically?" y; then
- pw groupadd -g $id -n $name
- return 0
- fi
- fi
- echo ""
- echo "I was not able to add group '$name:*:63:' as pw reported:"
- pw groupadd -g $id -n $name -N
- echo "Please correct this and try again!"
- echo ""
- return 1
-}
-
-case $2 in
-PRE-INSTALL)
-
- if ! check_group authpf 63 ; then
- exit 1
- fi
- ;;
-esac