summaryrefslogtreecommitdiff
path: root/net/phpldapadmin098/pkg-install-suphp
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>2005-01-21 15:36:45 +0000
committercvs2svn <cvs2svn@FreeBSD.org>2005-01-21 15:36:45 +0000
commit7011c19a8c96a2f8fb7c04d61cb28cdc507584a6 (patch)
tree22c0efaf2b6bb5b461389f9bac9542c7e3a5909a /net/phpldapadmin098/pkg-install-suphp
parentNow buildable on 4.x, still broken on >= 5.x. (diff)
This commit was manufactured by cvs2svn to create tag 'RELEASE_4_11_0'.release/4.11.0
Notes
Notes: svn path=/head/; revision=127022 svn path=/tags/RELEASE_4_11_0/; revision=127023; tag=release/4.11.0
Diffstat (limited to 'net/phpldapadmin098/pkg-install-suphp')
-rw-r--r--net/phpldapadmin098/pkg-install-suphp98
1 files changed, 0 insertions, 98 deletions
diff --git a/net/phpldapadmin098/pkg-install-suphp b/net/phpldapadmin098/pkg-install-suphp
deleted file mode 100644
index 6348afacd7a6..000000000000
--- a/net/phpldapadmin098/pkg-install-suphp
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-PATH=/usr/sbin:/usr/bin:/bin ; export PATH
-
-pladir=%%PREFIX%%/%%PLADIR%%
-plausr=%%PLAUSR%%
-plagrp=%%PLAGRP%%
-
-plagcos="phpLDAPadmin Owner"
-plahome=/nonexistent
-plashell=/sbin/nologin
-
-create_group() {
- local user group gcos home shell
-
- user=$1
- group=$2
- gcos=$3
- home=$4
- shell=$5
-
- if pw groupadd -n $group ; then
- echo "===> Group $group created"
- else
- cat <<-EOERRORMSG
- *** Failed to create the $group group.
-
- Please add the $user user and $group group
- manually with the commands:
-
- pw groupadd -n $group
- pw useradd -n $user -g $group -c "$gcos" \\
- -d $home -s $shell -h -
-
- and retry installing this package.
- EOERRORMSG
- exit 1
- fi
-}
-
-
-create_user() {
- local user group gcos home shell
-
- user=$1
- group=$2
- gcos=$3
- home=$4
- shell=$5
-
- if pw useradd -n $user -g $group -c "$gcos" -d $home -s $shell -h - ; then
- echo "===> Created $user user"
- else
- cat <<-EOERRORMSG
- *** Failed to create the $user user.
-
- Please add the $user user manually with the command:
-
- pw useradd -n $user -g $group -c "$gcos" \\
- -d $home -s $shell -h -
-
- and retry installing this package.
- EOERRORMSG
- exit 1
- fi
-}
-
-
-case $2 in
- PRE-INSTALL)
-
- # Create the pla user and group if they do not already exist
-
- if pw user show -n $plausr >/dev/null 2>&1 ; then
- echo "===> Using pre-existing user $plausr"
- else
- if ! pw group show -n $plagrp >/dev/null 2>&1 ; then
- create_group $plausr $plagrp "$plagcos" $plahome \
- $plashell
- fi
- create_user $plausr $plagrp "$plagcos" $plahome $plashell
- fi
- ;;
- POST-INSTALL)
-
- # Change ownership of the phpLDAPadmin directory
-
- echo "===> Adjusting file ownership in $pladir"
- chown -R $plausr:$plagrp $pladir || exit 1
- ;;
-esac
-
-#
-# That's All Folks!
-#