From 0ffa547f8e2260612a24dd329b2884004a56ada0 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 24 Sep 2019 18:51:08 -0400 Subject: [PATCH] Handle resolvconf --- installers/common.sh | 2 ++ installers/raspbian.sh | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/installers/common.sh b/installers/common.sh index a0127a6..1fb8081 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -226,6 +226,8 @@ function default_configuration() { sudo mv $webroot_dir/config/dnsmasq.conf /etc/dnsmasq.conf || install_error "Unable to move dnsmasq configuration file" sudo mv $webroot_dir/config/dhcpcd.conf /etc/dhcpcd.conf || install_error "Unable to move dhcpcd configuration file" sudo mv $webroot_dir/config/head /etc/resolvconf/resolv.conf.d/head || install_error "Unable to move resolvconf head file" + sudo rm /etc/resolv.conf + sudo ln -s /etc/resolvconf/run/resolv.conf /etc/resolv.conf sudo resolvconf -u || install_error "Unable to update resolv.conf" diff --git a/installers/raspbian.sh b/installers/raspbian.sh index 39bb6b7..a6bea7e 100755 --- a/installers/raspbian.sh +++ b/installers/raspbian.sh @@ -16,7 +16,7 @@ function install_dependencies() { sudo apt-get install lighttpd $php_package git hostapd dnsmasq vnstat resolvconf lokinet || install_error "Unable to install dependencies" } -#Remove NetworkManager, install dhcpd, create symlink to resolvconf. +#Remove NetworkManager and install dhcpd if required. function check_for_networkmananger() { install_log "Checking for NetworkManager" @@ -25,8 +25,6 @@ function check_for_networkmananger() { echo "Network Manager found. Replacing with DHCPCD" sudo apt-get -y purge network-manager sudo apt-get -y install dhcpcd5 - # sudo rm /etc/resolv.conf - # sudo ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf fi }