From bcf377b9cd82723bee05ca858c6ce62f3d598bba Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 25 Feb 2018 13:49:17 +0000 Subject: [PATCH] Tidy avahi utils --- src/freedombone-utils-avahi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/freedombone-utils-avahi b/src/freedombone-utils-avahi index 0e299cc3..7d24de6f 100755 --- a/src/freedombone-utils-avahi +++ b/src/freedombone-utils-avahi @@ -57,6 +57,7 @@ function create_avahi_service { } function mesh_avahi { + # shellcheck disable=SC2154 chroot "$rootdir" apt-get -yq install avahi-utils avahi-dnsconfd decarray=( 1 2 3 4 5 6 7 8 9 0 ) @@ -126,13 +127,12 @@ function install_avahi { return fi - ${PROJECT_NAME}-mesh-install -f avahi - if [ ! "$?" = "0" ]; then + if ! "${PROJECT_NAME}-mesh-install" -f avahi; then echo $'Failed to install avahi' exit 68442 fi - if [ $DEFAULT_DOMAIN_NAME ]; then + if [ "$DEFAULT_DOMAIN_NAME" ]; then sed -i "s|#host-name=.*|host-name=$LOCAL_NAME|g" /etc/avahi/avahi-daemon.conf sed -i "s|host-name=.*|host-name=$LOCAL_NAME|g" /etc/avahi/avahi-daemon.conf else