wok-stable diff postgresql/receipt @ rev 9165
Up: jack-audio-connection-kit to 0.120.1.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Mon Mar 07 23:31:01 2011 +0000 (2011-03-07) |
parents | 6d8cff5d29ea |
children | 02bbaa9d12ba |
line diff
1.1 --- a/postgresql/receipt Tue Feb 15 18:03:31 2011 +0000 1.2 +++ b/postgresql/receipt Mon Mar 07 23:31:01 2011 +0000 1.3 @@ -43,27 +43,29 @@ 1.4 cp -a stuff/etc $fs 1.5 ln -s /var/lib/pgsql/postgresql.conf $fs/etc 1.6 chmod 700 $fs/var/lib/pgsql 1.7 - cat $src/*.files-list | while read file; do 1.8 + cat $WOK/$PACKAGE/stuff/*.files-list | while read file; do 1.9 [ -f $fs$file ] && rm -f $fs$file 1.10 done 1.11 + 1.12 } 1.13 1.14 # Pre and post install commands for Tazpkg. 1.15 post_install() 1.16 { 1.17 # adduser postgres if needed 1.18 - if ! grep -q postgres $1/etc/passwd; then 1.19 + if ! grep -q postgres: $1/etc/passwd; then 1.20 echo -n "Adding user postgres..." 1.21 chroot $1/ adduser postgres -D -H -u 88 -h /var/lib/pgsql 1.22 - rm -f /var/lib/pgsql/.* /var/lib/pgsql/* 1.23 + #[ -d $1/var/lib/pgsql ] && rm -f $1/var/lib/pgsql/.* $1/var/lib/pgsql/* 1.24 status 1.25 fi 1.26 # addgroup postgres if needed 1.27 - if ! grep -q postgres $1/etc/group; then 1.28 + if ! grep -q postgres: $1/etc/group; then 1.29 echo -n "Adding group postgres..." 1.30 - chroot $1/ sh -c 'addgroup -g 88 postgres && addgroup postgres postgres' 1.31 + chroot $1/ sh -c 'addgroup -g 88 postgres' 1.32 status 1.33 fi 1.34 + [ ! -d $1/var/lib/pgsql ] && mkdir -p $1/var/lib/pgsql 1.35 chroot $1/ chown -R postgres.postgres /var/lib/pgsql /var/log/postgresql 1.36 cat <<EOF 1.37 ---- 1.38 @@ -80,6 +82,7 @@ 1.39 1.40 post_remove() 1.41 { 1.42 + # when both user and group have the same id# and name 1.43 + # both group and user will get removed with either delusr/delgroup 1.44 chroot $1/ deluser postgres 1.45 - chroot $1/ delgroup postgres 1.46 }