diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2009-12-24 20:50:22 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2009-12-24 20:50:22 +0000 |
commit | 9cb8c6f7360aff99658ac5041faf8b45f404d264 (patch) | |
tree | e4e7908253e8d873f3aba43941794e00f34c2989 /net/phpldapadmin/files | |
parent | - Update to 2.5.6 (diff) |
- Switch to using bsd.ports.options.mk -
- Use USERS and GROUPS functionality, instead of supplying pkg-install
scripts to create userids.
- Drop some warnings about changes that happened a long time ago now.
PR: 141804 141803
Submitted by: Matthew Seaman <m.seaman@infracaninophile.co.uk> (maintainer)
Notes
Notes:
svn path=/head/; revision=246552
Diffstat (limited to 'net/phpldapadmin/files')
-rw-r--r-- | net/phpldapadmin/files/pkg-deinstall.in | 4 | ||||
-rw-r--r-- | net/phpldapadmin/files/pkg-install.in | 89 |
2 files changed, 4 insertions, 89 deletions
diff --git a/net/phpldapadmin/files/pkg-deinstall.in b/net/phpldapadmin/files/pkg-deinstall.in index 8c531f2ea1e7..abdf9fe5b5aa 100644 --- a/net/phpldapadmin/files/pkg-deinstall.in +++ b/net/phpldapadmin/files/pkg-deinstall.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/net/phpldapadmin/files/pkg-deinstall.in,v 1.2 2008-03-09 04:45:38 rafan Exp $ +# $FreeBSD: /tmp/pcvs/ports/net/phpldapadmin/files/pkg-deinstall.in,v 1.3 2009-12-24 20:50:22 miwi Exp $ # case $2 in @@ -8,7 +8,7 @@ case $2 in cat <<EOMSG The phpldapadmin-suphp port has been deleted. If you are not upgrading and don't intend to use -phpLDAPadmin any more then you may wish to delete +phpldapadmin any more then you may wish to delete the %%PLA_USR%% account, which can be done with the following command: diff --git a/net/phpldapadmin/files/pkg-install.in b/net/phpldapadmin/files/pkg-install.in index ec4c871acb11..f1ccd622b9a7 100644 --- a/net/phpldapadmin/files/pkg-install.in +++ b/net/phpldapadmin/files/pkg-install.in @@ -1,104 +1,19 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/net/phpldapadmin/files/pkg-install.in,v 1.2 2008-03-09 04:45:38 rafan Exp $ +# $FreeBSD: /tmp/pcvs/ports/net/phpldapadmin/files/pkg-install.in,v 1.3 2009-12-24 20:50:22 miwi Exp $ # PATH=/usr/sbin:/usr/bin:/bin ; export PATH pla_dir=%%WWWDIR%% pla_usr=%%PLA_USR%% -pla_uid=%%PLA_UID%% pla_grp=%%PLA_GRP%% -pla_gid=%%PLA_GID%% - -pla_gcos="%%PLA_GCOS%%" -pla_home=%%PLA_HOME%% -pla_shell=%%PLA_SHELL%% - -create_group() { - local user uid group gid gcos home shell - - user=$1 - uid=$2 - group=$3 - gid=$4 - gcos=$5 - home=$6 - shell=$7 - - - if pw group show -n $group >/dev/null 2>&1 ; then - echo "===> Using pre-existing group $group" - else - if pw groupadd -n $group -g $gid ; 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 -g $gid - pw useradd -n $user -u $uid -g $group -c "$gcos" \\ - -d $home -s $shell -h - - - and retry installing this package. - EOERRORMSG - exit 1 - fi - fi - -} - - -create_user() { - local user uid group gid gcos home shell - - user=$1 - uid=$2 - group=$3 - gid=$4 - gcos=$5 - home=$6 - shell=$7 - - if pw user show -n $user >/dev/null 2>&1 ; then - echo "===> Using pre-existing user $user" - else - if pw useradd -n $user -u $uid -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 -u $uid -g $group -c "$gcos" \\ - -d $home -s $shell -h - - - and retry installing this package. - EOERRORMSG - exit 1 - fi - fi -} case $2 in - PRE-INSTALL) - - # Create the pla user and group if they do not already exist - create_group $pla_usr $pla_uid $pla_grp $pla_gid \ - "$pla_gcos" $pla_home $pla_shell - create_user $pla_usr $pla_uid $pla_grp $pla_gid \ - "$pla_gcos" $pla_home $pla_shell - ;; - POST-INSTALL) - # Change ownership of the phpMyAdm directory + # Change ownership of the phpldapadmin directory echo "===> Adjusting file ownership in $pla_dir" chown -R $pla_usr:$pla_grp $pla_dir || exit 1 |