Created
February 14, 2017 22:31
-
-
Save brimston3/f95e9d2708ca511ed2e574e3e80dadfe to your computer and use it in GitHub Desktop.
Things you should not do with /etc/network/interfaces
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################## | |
# If you have not read the multiple disclaimers, do not do this. # | |
# It is supposed to be a joke, haha. # | |
################################################################## | |
This goofiness is valid: | |
/etc/network/interfaces: | |
for procif in /etc/network/interfaces.d/*; do | |
procifname="$(basename $procif)" | |
source "$procif" "$procifname" | |
done | |
/etc/network/interfaces.d/eth0: | |
ActiveIF=$1 | |
allow-hotplug $ActiveIF | |
iface $ActiveIF inet dhcp | |
/etc/network/interfaces.d/eth1 -> eth0 | |
======================================= | |
But it's easier to do: | |
/etc/network/interfaces: | |
for procifname in eth0 eth1 eth2 eth3; do | |
allow-hotplug "$procifname" | |
iface "$procifname" inet dhcp | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment