From 1b72fc896d262f2797314551386cda45719addf6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 20 Nov 2016 22:12:49 +0000 Subject: [PATCH] Configure avahi on regular client installs --- src/freedombone-client | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/freedombone-client b/src/freedombone-client index 1c1a6ea4..94da3d25 100755 --- a/src/freedombone-client +++ b/src/freedombone-client @@ -267,6 +267,16 @@ function remove_known_hosts_entries { fi } +function setup_avahi_client { + echo $'Configuring Avahi' + if [ ! -f /usr/bin/pacman ]; then + sudo apt-get -yq install avahi-utils avahi-autoipd avahi-dnsconfd + else + sudo pacman -S --noconfirm avahi nss-mdns + sudo sed -i 's|hosts:.*|hosts: files mdns_minimal [NOTFOUND=return] dns myhostname|g' /etc/nsswitch.conf + fi +} + while [[ $# > 1 ]] do key="$1" @@ -303,6 +313,7 @@ do done echo $'Configuring client' +setup_avahi_client setup_client_app refresh_gpg_keys configure_ssh_client @@ -311,12 +322,6 @@ configure_monkeysphere remove_known_hosts_entries if [[ $MESH_CLIENT_INSTALL == $'yes' || $MESH_CLIENT_INSTALL == $'y' || $MESH_CLIENT_INSTALL == $'on' ]]; then echo $'Installing mesh packages' - if [ ! -f /usr/bin/pacman ]; then - sudo apt-get -yq install avahi-utils avahi-autoipd avahi-dnsconfd - else - sudo pacman -S --noconfirm avahi nss-mdns - sudo sed -i 's|hosts:.*|hosts: files mdns_minimal [NOTFOUND=return] dns myhostname|g' /etc/nsswitch.conf - fi sudo ${PROJECT_NAME}-mesh-install -f tox_node sudo ${PROJECT_NAME}-mesh-install -f toxic ${PROJECT_NAME}-mesh-install -f qtox