wok-next diff partimage/receipt @ rev 18730

Quote root dir in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 20 15:13:45 2015 +0100 (2015-12-20)
parents 49a446459762
children 6fab3264ba87
line diff
     1.1 --- a/partimage/receipt	Wed Apr 15 09:53:08 2015 +0200
     1.2 +++ b/partimage/receipt	Sun Dec 20 15:13:45 2015 +0100
     1.3 @@ -40,14 +40,14 @@
     1.4  {
     1.5  	echo "Processing post install commands..."
     1.6  	echo "Adding user/group partimag..."
     1.7 -	chroot $1/ adduser -S -H -D partimag
     1.8 +	chroot "$1/" adduser -S -H -D partimag
     1.9  
    1.10  	echo "Setting permissions for config files"
    1.11 -	chmod 0600 $1/etc/partimaged/*
    1.12 -	chroot $1/ chown partimag.partimag $1/etc/partimaged/*	
    1.13 +	chmod 0600 "$1"/etc/partimaged/*
    1.14 +	chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/*	
    1.15  	
    1.16  	echo " Creating image files directory"
    1.17 -	chroot $1/ install -g partimag -o partimag -m 0755 -d $1/var/lib/partimaged
    1.18 +	chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged"
    1.19  	
    1.20  	echo ""
    1.21  	echo -e "\nTo starts $PACKAGE server you can run :\n"
    1.22 @@ -57,10 +57,10 @@
    1.23  
    1.24  post_remove()
    1.25  {
    1.26 -	chroot $1/ deluser partimag
    1.27 -	chroot $1/ delgroup partimag
    1.28 +	chroot "$1/" deluser partimag
    1.29 +	chroot "$1/" delgroup partimag
    1.30  	
    1.31 -	if [ -f $1/etc/paritimaged ]; then
    1.32 -		rm -rf $1/etc/partimaged
    1.33 +	if [ -f "$1/etc/paritimaged" ]; then
    1.34 +		rm -rf "$1/etc/partimaged"
    1.35  	fi
    1.36  }