wok-6.x rev 15644

connman: fail safe post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Dec 10 13:11:40 2013 +0000 (2013-12-10)
parents 15030aba419f
children 3196dad7fb36
files connman/receipt
line diff
     1.1 --- a/connman/receipt	Tue Dec 10 07:55:55 2013 +0000
     1.2 +++ b/connman/receipt	Tue Dec 10 13:11:40 2013 +0000
     1.3 @@ -66,12 +66,12 @@
     1.4  post_install()
     1.5  {
     1.6  	local root=$1
     1.7 -	if ! grep -q ^CONNMAND_OPTIONS $root/etc/daemons.conf; then
     1.8 +	if ! grep -qs ^CONNMAND_OPTIONS $root/etc/daemons.conf; then
     1.9  		echo '# Connman daemon options.' >> $root/etc/daemons.conf
    1.10  		echo 'CONNMAND_OPTIONS=""' >> $root/etc/daemons.conf
    1.11  		echo '' >> $root/etc/daemons.conf
    1.12  	fi
    1.13 -	if [ -z "$root" ]; then
    1.14 +	if [ -z "$root" -a -s /etc/network.conf ]; then
    1.15  		/etc/init.d/connman start || /etc/init.d/connman restart
    1.16  	fi
    1.17  }