From f4d9b155595198b969e8fcf0faa267faed91d4ef Mon Sep 17 00:00:00 2001 From: necro-nemsis Date: Fri, 6 May 2022 00:44:04 -0400 Subject: [PATCH] Set run level 5 --- installers/common.sh | 1 + installers/raspbian.sh | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/installers/common.sh b/installers/common.sh index 283541b..48f818e 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -440,6 +440,7 @@ function install_raspap() { update_system_packages install_dependencies patch_lokinet_service + set_runlevel_five create_raspap_directories common_interfaces check_for_networkmananger diff --git a/installers/raspbian.sh b/installers/raspbian.sh index 5cf41aa..baced1b 100755 --- a/installers/raspbian.sh +++ b/installers/raspbian.sh @@ -32,8 +32,17 @@ function patch_lokinet_service() { install_log "Patching Lokinet Service" sed -i '/^After=network-online.target/a Wants=dnsmasq.service \nAfter=dnsmasq.service' /lib/systemd/system/lokinet.service sudo systemctl daemon-reload - -} + +} + +#Avoid race condition between Hostapd and dnsmasq + +function set_runlevel_five() { + install_log "Setting Hostapd after DNSMasq init sequence" + sudo mv /etc/rc5.d/S01dnsmasq /etc/rc5.d/S02dnsmasq + sudo mv /etc/rc5.d/S01hostapd /etc/rc5.d/S03hostapd + +} #Remove NetworkManager and install dhcpd if required Armbian.