wok-6.x diff couchdb/receipt @ rev 17552
Update some post_install for install --root
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jan 30 10:17:37 2015 +0100 (2015-01-30) |
parents | b9c6c8240bba |
children | 9e01bc6321ea |
line diff
1.1 --- a/couchdb/receipt Mon May 19 07:53:54 2014 +0000 1.2 +++ b/couchdb/receipt Fri Jan 30 10:17:37 2015 +0100 1.3 @@ -53,7 +53,7 @@ 1.4 { 1.5 INIT_FILE="/etc/init.d/$PACKAGE" 1.6 echo "Processing pre-install commands..." 1.7 - [ -f $INIT_FILE ] && $INIT_FILE stop 1.8 + [ -f $1$$INIT_FILE ] && chroot "$1/" $INIT_FILE stop 1.9 echo "Done..." 1.10 } 1.11 1.12 @@ -68,13 +68,14 @@ 1.13 1.14 echo "Processing post-install commands..." 1.15 1.16 - grep -q "$PACKAGE" /etc/group || addgroup -S $PACKAGE 1.17 + grep -q "$PACKAGE" $1/etc/group || chroot "$1/" addgroup -S $PACKAGE 1.18 1.19 - grep -q "$PACKAGE" /etc/passwd || adduser -S -D -H -h $LIBDIR \ 1.20 - -G $PACKAGE -s /bin/sh -g "CouchDB Administrator" $PACKAGE 1.21 + grep -q "$PACKAGE" $1/etc/passwd || chroot "$1/" adduser -S -D -H \ 1.22 + -h $LIBDIR -G $PACKAGE -s /bin/sh -g "CouchDB Administrator" $PACKAGE 1.23 1.24 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do 1.25 - chown -R $PACKAGE:$PACKAGE $DIR && chmod -R 0770 $DIR 1.26 + chroot "$1/" chown -R $PACKAGE:$PACKAGE $DIR && 1.27 + chroot "$1/" chmod -R 0770 $DIR 1.28 done 1.29 1.30 echo "Done..." 1.31 @@ -85,7 +86,7 @@ 1.32 { 1.33 INIT_FILE="/etc/init.d/$PACKAGE" 1.34 echo "Processing pre-remove commands..." 1.35 - [ -f $INIT_FILE ] && $INIT_FILE stop 1.36 + [ -f $1$INIT_FILE ] && chroot "$1/" $INIT_FILE stop 1.37 echo "Done..." 1.38 } 1.39 1.40 @@ -98,10 +99,10 @@ 1.41 1.42 echo "Processing post-remove commands..." 1.43 1.44 - deluser $PACKAGE 1.45 + chroot "$1/" deluser $PACKAGE 1.46 1.47 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do 1.48 - rm -rf $DIR 1.49 + rm -rf $1$DIR 1.50 done 1.51 1.52 echo "Done..."