Skip to content

Commit

Permalink
fix commitup install opts
Browse files Browse the repository at this point in the history
delete wifi conn on comitup setup
nmcli timeout 30s

Signed-off-by: Markus Storm <[email protected]>
  • Loading branch information
mstormi committed Feb 28, 2024
1 parent 898124c commit 1ed2ac2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build-image/first-boot.bash
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if is_bookworm; then
if [[ -n $wifiSSID ]]; then
# Setup WiFi via NetworkManager
# shellcheck source=/etc/openhabian.conf disable=SC2154
nmcli d wifi connect "${wifiSSID}" password "${wifiPassword}" ifname wlan0
nmcli -w 30 d wifi connect "${wifiSSID}" password "${wifiPassword}" ifname wlan0
fi
elif [[ -z $wifiSSID ]]; then
# Actually check if ethernet is working
Expand Down Expand Up @@ -184,7 +184,7 @@ if ! running_in_docker && tryUntil "ping -c1 8.8.8.8 &> /dev/null || curl --sile
if setup_hotspot "install"; then echo "OK"; else echo "FAILED"; fi
#cp "${BASEDIR:-/opt/openhabian}"/includes/interfaces /etc/network/
echo "$(timestamp) [openHABian] Hotspot software installed. Rebooting your system to make it take effect!"
reboot
#reboot
fi
echo "$(timestamp) [openHABian] The public internet is not reachable. Please check your local network environment."
echo " We have launched a publicly accessible hotspot named $(grep ap_name: /etc/comitup.conf | cut -d' ' -f2)."
Expand Down
3 changes: 2 additions & 1 deletion functions/wifi.bash
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ setup_hotspot() {
# shellcheck disable=SC2154
sed -i -e "s|ap_password:.*$|ap_password: ${hotspotpw}|g" /etc/comitup.conf

if cond_redirect DEBIAN_FRONTEND=noninteractive apt install --yes --no_install_recommends -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' comitup; then echo "OK"; else echo "FAILED"; return 1; fi
if cond_redirect DEBIAN_FRONTEND=noninteractive apt install --yes -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' comitup; then echo "OK"; else echo "FAILED"; return 1; fi
comitup-cli d
echo "denyinterfaces wlan0 eth0" >> /etc/dhcpcd.conf
sed -i '3 i dhcp=internal' /etc/NetworkManager/NetworkManager.conf
install -m 644 includes/generic/100-disable-wifi-mac-randomization.conf /etc/NetworkManager/conf.d/
Expand Down

0 comments on commit 1ed2ac2

Please sign in to comment.