diff --git a/scripts/helperscripts/inc.networkHelper.sh b/scripts/helperscripts/inc.networkHelper.sh index ff0df181e..f96a9138d 100644 --- a/scripts/helperscripts/inc.networkHelper.sh +++ b/scripts/helperscripts/inc.networkHelper.sh @@ -74,7 +74,7 @@ add_wireless_network() { local wpa_network_with_dummy_psk=$(wpa_passphrase "$ssid" "dummypsk") if echo "$wpa_network_with_dummy_psk" | grep -qF 'network='; then local wpa_network=$(echo "$wpa_network_with_dummy_psk" | sed -e '/#psk/d' -e "s/psk=.*$/psk=${pass}/" -e "/^}/i\\\tpriority=${prio}" ) - sudo bash -c "echo '${wpa_network}' >> $WPA_CONF" + echo "${wpa_network}" | sudo tee -a "$WPA_CONF" > /dev/null fi fi fi diff --git a/scripts/helperscripts/setup_autohotspot.sh b/scripts/helperscripts/setup_autohotspot.sh index f74ed88d9..61d0e2297 100644 --- a/scripts/helperscripts/setup_autohotspot.sh +++ b/scripts/helperscripts/setup_autohotspot.sh @@ -125,7 +125,7 @@ _install_autohotspot_dhcpcd() { fi if [[ ! $(grep -w "${dhcpcd_conf_nohook_wpa_supplicant}" ${dhcpcd_conf}) ]]; then - sudo bash -c "echo ${dhcpcd_conf_nohook_wpa_supplicant} >> ${dhcpcd_conf}" + echo "${dhcpcd_conf_nohook_wpa_supplicant}" | sudo tee -a "${dhcpcd_conf}" > /dev/null fi # create service to trigger hotspot