head	1.6;
access;
symbols
	RELEASE_6_0_0:1.5
	RELEASE_5_4_0:1.5
	RELEASE_4_11_0:1.5
	RELEASE_5_3_0:1.5
	RELEASE_4_10_0:1.5
	RELEASE_5_2_1:1.5
	RELEASE_5_2_0:1.5
	RELEASE_4_9_0:1.5;
locks; strict;
comment	@# @;


1.6
date	2005.09.14.23.14.38;	author pav;	state dead;
branches;
next	1.5;

1.5
date	2003.07.28.16.26.29;	author foxfair;	state Exp;
branches;
next	1.4;

1.4
date	2003.07.04.01.34.50;	author foxfair;	state Exp;
branches;
next	1.3;

1.3
date	2003.06.26.17.58.38;	author foxfair;	state Exp;
branches;
next	1.2;

1.2
date	2003.06.26.16.28.15;	author foxfair;	state Exp;
branches;
next	1.1;

1.1
date	2003.06.13.01.19.12;	author foxfair;	state Exp;
branches;
next	;


desc
@@


1.6
log
@- Remove security/pf and security/authpf ports. They were only useful on
  FreeBSD 5.0 - 5.2.1.

Requested by:	mlaier (maintainer) via linimon
@
text
@#!/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
@


1.5
log
@Submitted by:	"Pyun YongHyeon" <yongari@@kt-is.co.kr>
Reviewed by:	maintainer
Fix a build problem in bento.
@
text
@@


1.4
log
@PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
Revert the change of pkg-install r1.3, it shouldn't be there.

Pointy hat to:		me
Requested by:		maintainer
@
text
@d59 1
a59 1
    if pw groupshow $name -q ; then
@


1.3
log
@Add 'proxy' to the group 'authpf' after create it.
@
text
@d66 1
a66 1
	    pw groupadd -g $id -n $name -M proxy
@


1.2
log
@Approved by:	maintainer
Fix bento build error by registering 'authpf' gid to 63.
@
text
@d66 1
a66 1
	    pw groupadd -g $id -n $name
d71 1
a71 1
    echo "I was not able to add group 'authpf:*:63:' as pw reported:"
@


1.1
log
@Add authpf 1.0, authentification shell for pf gateways. This port depends
on security/pf first.

PR:		52123
Submitted by:	Max Laier <max@@love2party.net>
@
text
@d71 1
a71 1
    echo "I was not able to add group 'proxy:*:71:' as pw reported:"
d81 1
a81 1
    if ! check_group authpf 72 ; then 
@

