summaryrefslogtreecommitdiff
path: root/databases/phpmyadmin/files
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2009-12-22 11:48:41 +0000
committerMartin Wilke <miwi@FreeBSD.org>2009-12-22 11:48:41 +0000
commit9ce226fbd72372c2f833142445ebedd921348c84 (patch)
treef38563b0f9eb143f34591ffc142917f9dfb1b492 /databases/phpmyadmin/files
parentMerge support of third party slowfs_cache module from (diff)
- Switch to using bsd.ports.options.mk
- Use USERS and GROUPS functionality , instead of supplying pkg-install - Drop some warnings about changes that happened a long time ago now. PR: 141801 Submitted by: Matthew Seaman <m.seaman@infracaninophile.co.uk> (maintainer)
Notes
Notes: svn path=/head/; revision=246448
Diffstat (limited to 'databases/phpmyadmin/files')
-rw-r--r--databases/phpmyadmin/files/pkg-install.in91
1 files changed, 3 insertions, 88 deletions
diff --git a/databases/phpmyadmin/files/pkg-install.in b/databases/phpmyadmin/files/pkg-install.in
index b8adfb92959b..4a552295fda4 100644
--- a/databases/phpmyadmin/files/pkg-install.in
+++ b/databases/phpmyadmin/files/pkg-install.in
@@ -5,103 +5,18 @@
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
-pma_dir=%%WWWDIR%%
+WWWDIR=%%WWWDIR%%
pma_usr=%%PMA_USR%%
-pma_uid=%%PMA_UID%%
pma_grp=%%PMA_GRP%%
-pma_gid=%%PMA_GID%%
-
-pma_gcos="%%PMA_GCOS%%"
-pma_home=%%PMA_HOME%%
-pma_shell=%%PMA_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 pma user and group if they do not already exist
- create_group $pma_usr $pma_uid $pma_grp $pma_gid \
- "$pma_gcos" $pma_home $pma_shell
- create_user $pma_usr $pma_uid $pma_grp $pma_gid \
- "$pma_gcos" $pma_home $pma_shell
- ;;
POST-INSTALL)
# Change ownership of the phpMyAdm directory
- echo "===> Adjusting file ownership in $pma_dir"
- chown -R $pma_usr:$pma_grp $pma_dir || exit 1
+ echo "===> Adjusting file ownership in $WWWDIR"
+ chown -R $pma_usr:$pma_grp $WWWDIR || exit 1
;;
esac