#!/bin/sh ########################################################################### # # Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file wifi_save_dhcp_interface.sh # # @author (last) Behrouz NematiPour # @date (last) 25-Feb-2022 # @author (original) Behrouz NematiPour # @date (original) 11-May-2021 # ############################################################################ if [ $# -eq 0 ]; then currentFile=$(basename "$0") echo "Usage: ./$currentFile " exit 0 fi iface=$1 echo "auto $iface sudo iface $iface inet dhcp wpa-driver wext wpa-conf /etc/wpa_supplicant.conf" | sudo tee /etc/network/interfaces > /dev/null