We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13de866 commit fa7dac4Copy full SHA for fa7dac4
scripts/get.config.sh
@@ -56,7 +56,8 @@ get_config () {
56
export CURRENT_HOSTNAME="$(hostname -s)"
57
export CURRENT_FQDN="$(hostname -s).$(hostname -d)"
58
59
- if [ -f /etc/network/interfaces.d/${MY_PRIVATE_NETWORK_DEVICE}.cfg ] ; then
+ export AVAILABLE_NETWORK_DEVICE="$(ip link show | grep DOWN | cut -d " " -f 2 | cut -d ":" -f 1)"
60
+ if [[ "${AVAILABLE_NETWORK_DEVICE}" == "" && -f /etc/network/interfaces.d/${MY_PRIVATE_NETWORK_DEVICE}.cfg ]] ; then
61
export AVAILABLE_NETWORK_DEVICE="${MY_PRIVATE_NETWORK_DEVICE}"
62
fi
63
0 commit comments