wok diff ndoutils/receipt @ rev 20091

tar: update deps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Oct 03 09:50:38 2017 +0200 (2017-10-03)
parents 0d8a1a3edc72
children 970c5ec9a60a
line diff
     1.1 --- a/ndoutils/receipt	Sun May 18 20:24:07 2014 +0000
     1.2 +++ b/ndoutils/receipt	Tue Oct 03 09:50:38 2017 +0200
     1.3 @@ -72,22 +72,22 @@
     1.4  
     1.5  post_install()
     1.6  {
     1.7 -	if ! grep -q nagios $1/etc/passwd; then
     1.8 +	if ! grep -q nagios "$1/etc/passwd"; then
     1.9  		echo -n "Adding user nagios..."
    1.10 -		chroot $1/ adduser -S -D -H nagios
    1.11 +		chroot "$1/" adduser -S -D -H nagios
    1.12  		status
    1.13  	fi
    1.14  		
    1.15 -	if ! grep -q ndomod.cfg $1/etc/nagios/nagios.cfg; then
    1.16 -		sed -i '/LOG ROTATION METHOD/i\broker_module=/usr/lib/ndoutils/ndomod.o config_file=/etc/nagios/ndomod.cfg' $1/etc/nagios/nagios.cfg
    1.17 -		chroot $1/ chown nagios.nagios $1/etc/nagios/nagios.cfg
    1.18 +	if ! grep -q ndomod.cfg "$1/etc/nagios/nagios.cfg"; then
    1.19 +		sed -i '/LOG ROTATION METHOD/i\broker_module=/usr/lib/ndoutils/ndomod.o config_file=/etc/nagios/ndomod.cfg' "$1/etc/nagios/nagios.cfg"
    1.20 +		chroot "$1/" chown nagios.nagios /etc/nagios/nagios.cfg
    1.21  	fi
    1.22  	
    1.23 -	chroot $1/ chown nagios.nagios $fs/usr/lib/ndoutils/ndomod.o \
    1.24 -	 $fs/etc/nagios/ndo2db.cfg $fs/etc/nagios/ndomod.cfg \
    1.25 -	 $fs/etc/nagios
    1.26 +	chroot "$1/" chown nagios.nagios /usr/lib/ndoutils/ndomod.o \
    1.27 +	 /etc/nagios/ndo2db.cfg /etc/nagios/ndomod.cfg \
    1.28 +	 /etc/nagios
    1.29  
    1.30 -	sed -i "s/nagios/ndo2db nagios/" $1/etc/rcS.conf 
    1.31 +	sed -i "s/nagios/ndo2db nagios/" "$1/etc/rcS.conf"
    1.32  	
    1.33  	if [ -z "$1" ]; then	
    1.34  		[ -f /var/run/mysqld/mysql.pid ] || /etc/init.d/mysql start
    1.35 @@ -107,7 +107,7 @@
    1.36  
    1.37  post_remove()
    1.38  {
    1.39 -		sed -i "s/ndo2db//" $1/etc/rcS.conf 
    1.40 +		sed -i "s/ndo2db//" "$1/etc/rcS.conf"
    1.41  		/etc/init.d/nagios restart
    1.42 -		sed -i 's|broker_module=/usr/lib/ndoutils/ndomod.o config_file=/etc/nagios/ndomod.cfg||' $1/etc/nagios/nagios.cfg
    1.43 +		sed -i 's|broker_module=/usr/lib/ndoutils/ndomod.o config_file=/etc/nagios/ndomod.cfg||' "$1/etc/nagios/nagios.cfg"
    1.44  }