diff options
Diffstat (limited to 'security/osiris/pkg-install')
-rw-r--r-- | security/osiris/pkg-install | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/security/osiris/pkg-install b/security/osiris/pkg-install deleted file mode 100644 index eca0e185ef1d..000000000000 --- a/security/osiris/pkg-install +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -ask() { - local question default answer - - question=$1 - default=$2 - if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then - read -p "${question} [${default}]? " answer - fi - echo ${answer:-${default}} -} - -yesno() { - local question default answer - - question=$1 - default=$2 - while :; do - answer=$(ask "${question}" "${default}") - case "${answer}" in - [Yy]*) return 0;; - [Nn]*) return 1;; - esac - echo "Please answer yes or no." - done -} - -make_account() { - local u g gcos - - u=$1 - g=$2 - gcos=$3 - - if pw group show "${g}" >/dev/null 2>&1; then - echo "You already have a group \"${g}\", so I will use it." - else - echo "You need a group \"${g}\"." - if which -s pw && yesno "Would you like me to create it" y - then - pw groupadd ${g} || exit - echo "Done." - else - echo "Please create it, and try again." - exit 1 - fi - fi - - if pw user show "${u}" >/dev/null 2>&1; then - echo "You already have a user \"${u}\", so I will use it." - else - echo "You need a user \"${u}\"." - if which -s pw && yesno "Would you like me to create it" y - then - pw useradd ${u} -g ${g} -h - -d /nonexistent -s /sbin/nologin -c "${gcos}" || exit - echo "Done." - else - echo "Please create it, and try again." - exit 1 - fi - fi -} - -case $2 in - -PRE-INSTALL) - make_account osiris osiris "Osiris" - ;; -esac |