diff --git a/debian.sh b/debian.sh index fed4b63..e9d9185 100755 --- a/debian.sh +++ b/debian.sh @@ -6,7 +6,7 @@ baseDir="$(realpath "$(dirname "${0}")")" source \ /etc/os-release source \ - "${BASEDIR}/system.conf" + "${baseDir}/system.conf" if [[ "${1}" == '--mmdebstrap' ]]; then @@ -49,13 +49,13 @@ zstd\ "${VERSION_CODENAME}" \ /mnt elif [[ "${1}" == '--network-interfaces' ]]; then - NETWORK_INTERFACE=($(ip -br addr show | sed 's| .*$||g' | grep -v '^lo' | grep -v 'tailscale' | grep -v '^wg')) + networkInterface=($(ip -br addr show | sed 's| .*$||g' | grep -v '^lo' | grep -v 'tailscale' | grep -v '^wg')) shopt -s extglob - for ((i = 0; i < ${#NETWORK_INTERFACE[@]}; i++)); do - cat << EOF | tee /mnt/etc/network/interfaces.d/${NETWORK_INTERFACE[$i]} &> /dev/null -allow-hotplug ${NETWORK_INTERFACE[$i]} -iface ${NETWORK_INTERFACE[$i]} inet dhcp + for ((i = 0; i < ${#networkInterface[@]}; i++)); do + cat << EOF | tee /mnt/etc/network/interfaces.d/${networkInterface[$i]} &> /dev/null +allow-hotplug ${networkInterface[$i]} +iface ${networkInterface[$i]} inet dhcp EOF done elif [[ "${1}" == '--sources' ]]; then diff --git a/elementary.sh b/elementary.sh index d10577b..78e23f0 100755 --- a/elementary.sh +++ b/elementary.sh @@ -6,7 +6,7 @@ baseDir="$(realpath "$(dirname "${0}")")" source \ /etc/os-release source \ - "${BASEDIR}/system.conf" + "${baseDir}/system.conf" if [[ "${1}" == '--mmdebstrap' ]]; then diff --git a/fedora.sh b/fedora.sh index 737c51e..72a91a1 100755 --- a/fedora.sh +++ b/fedora.sh @@ -6,7 +6,7 @@ baseDir="$(realpath "$(dirname "${0}")")" source \ /etc/os-release source \ - "${BASEDIR}/system.conf" + "${baseDir}/system.conf" if [[ "${1}" == '--rsync' ]]; then