#!/bin/sh # an installation script for pf_freebsd copied from Wnn6 check_pw() { if which -s pw; then : else cat < /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