#!/bin/sh ########################################################################### # # Copyright (c) 2023-2025 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_static_interface_assignments.sh # # @author (last) Craig Nadler # @date (last) 30-Jun-2023 # @author (original) Behrouz NematiPour # @date (original) 29-Jun-2023 # ############################################################################ if [ $# -eq 0 ]; then currentFile=$(basename "$0") echo "Usage: ./$currentFile " exit 0 fi iface=$1 ip=$2 gateway=$3 subnet_mask=$4 echo "auto $iface iface $iface inet static address $ip netmask $subnet_mask gateway $3" | sudo tee /etc/network/interfaces > /dev/null ./wifi_set_gateway.sh $gateway