Skip to content

Commit fa7dac4

Browse files
committed
Change the method to determine the private network interface again.
modified: scripts/get.config.sh
1 parent 13de866 commit fa7dac4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/get.config.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ get_config () {
5656
export CURRENT_HOSTNAME="$(hostname -s)"
5757
export CURRENT_FQDN="$(hostname -s).$(hostname -d)"
5858

59-
if [ -f /etc/network/interfaces.d/${MY_PRIVATE_NETWORK_DEVICE}.cfg ] ; then
59+
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
6061
export AVAILABLE_NETWORK_DEVICE="${MY_PRIVATE_NETWORK_DEVICE}"
6162
fi
6263

0 commit comments

Comments
 (0)