wok diff logrotate/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 380ffe05937a
children e8c84b81fa04
line diff
     1.1 --- a/logrotate/receipt	Sat Aug 10 17:00:38 2013 +0000
     1.2 +++ b/logrotate/receipt	Sun Dec 20 15:13:45 2015 +0100
     1.3 @@ -32,19 +32,19 @@
     1.4  
     1.5  post_install()
     1.6  {
     1.7 -	if [ -f $1/var/spool/cron/crontabs/root ]; then
     1.8 +	if [ -f "$1/var/spool/cron/crontabs/root" ]; then
     1.9  		echo "Runing post install command..."
    1.10  		echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \
    1.11 -	   		>> $1/var/spool/cron/crontabs/root
    1.12 +	   		>> "$1/var/spool/cron/crontabs/root"
    1.13  	fi
    1.14  }
    1.15  
    1.16  
    1.17  post_remove()
    1.18  {
    1.19 -	if [ -f $1/var/spool/cron/crontabs/root ]; then
    1.20 +	if [ -f "$1/var/spool/cron/crontabs/root" ]; then
    1.21  		echo "Runing post install command..."
    1.22 -		sed -i s!.*logrotate.*!!  $1/var/spool/cron/crontabs/root
    1.23 +		sed -i s!.*logrotate.*!!  "$1/var/spool/cron/crontabs/root"
    1.24  	fi
    1.25  }
    1.26