summaryrefslogtreecommitdiffstats
path: root/rc.d/net-set-variable
blob: d2d68faf83e6f30783b629195bad6f20b769c012 (plain)
1
2
3
4
5
6
7
8
9
10
# Set the NET variable if specified on the kernel command line.

net_set_variable() {
	local re="\<NET=([^ ]+)\>"
	if [[ -f /proc/cmdline && $(< /proc/cmdline) =~ $re ]]; then
		export NET=${BASH_REMATCH[1]}
	fi
}

add_hook multi_start net_set_variable