소스 검색

Tidy avahi utils

Bob Mottram 7 년 전
부모
커밋
bcf377b9cd
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3
    3
      src/freedombone-utils-avahi

+ 3
- 3
src/freedombone-utils-avahi 파일 보기

57
 }
57
 }
58
 
58
 
59
 function mesh_avahi {
59
 function mesh_avahi {
60
+    # shellcheck disable=SC2154
60
     chroot "$rootdir" apt-get -yq install avahi-utils avahi-dnsconfd
61
     chroot "$rootdir" apt-get -yq install avahi-utils avahi-dnsconfd
61
 
62
 
62
     decarray=( 1 2 3 4 5 6 7 8 9 0 )
63
     decarray=( 1 2 3 4 5 6 7 8 9 0 )
126
         return
127
         return
127
     fi
128
     fi
128
 
129
 
129
-    ${PROJECT_NAME}-mesh-install -f avahi
130
-    if [ ! "$?" = "0" ]; then
130
+    if ! "${PROJECT_NAME}-mesh-install" -f avahi; then
131
         echo $'Failed to install avahi'
131
         echo $'Failed to install avahi'
132
         exit 68442
132
         exit 68442
133
     fi
133
     fi
134
 
134
 
135
-    if [ $DEFAULT_DOMAIN_NAME ]; then
135
+    if [ "$DEFAULT_DOMAIN_NAME" ]; then
136
         sed -i "s|#host-name=.*|host-name=$LOCAL_NAME|g" /etc/avahi/avahi-daemon.conf
136
         sed -i "s|#host-name=.*|host-name=$LOCAL_NAME|g" /etc/avahi/avahi-daemon.conf
137
         sed -i "s|host-name=.*|host-name=$LOCAL_NAME|g" /etc/avahi/avahi-daemon.conf
137
         sed -i "s|host-name=.*|host-name=$LOCAL_NAME|g" /etc/avahi/avahi-daemon.conf
138
     else
138
     else