From aa9ccf77c6648515ba58c37b9345cdbd561028db Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 8 May 2008 15:37:41 +0000 Subject: * Mördercommit ;-) * Major Repository Reorganisation * API 0.4 Softfreeze to come MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dist/etc/hotplug.d/iface/20-aliases | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 contrib/package/luci-addons/dist/etc/hotplug.d/iface/20-aliases (limited to 'contrib/package/luci-addons/dist/etc/hotplug.d') diff --git a/contrib/package/luci-addons/dist/etc/hotplug.d/iface/20-aliases b/contrib/package/luci-addons/dist/etc/hotplug.d/iface/20-aliases new file mode 100644 index 0000000000..b9986e3aaa --- /dev/null +++ b/contrib/package/luci-addons/dist/etc/hotplug.d/iface/20-aliases @@ -0,0 +1,24 @@ +add_aliases() { + local config="$1" + + config_get base "$INTERFACE" ifname + config_get iface "$config" ifname + config_get ipaddr "$config" ipaddr + config_get auto "$config" auto + + [ "${iface%%:*}" == "$base" -a "$iface" != "$base" ] && { + case "$auto" in + 1|on|enabled) setup_interface "$iface" "$config";; + *) return 1;; + esac + } +} + + +case "$ACTION" in + ifup) + include /lib/network + scan_interfaces + config_foreach "add_aliases" interface + ;; +esac -- cgit v1.2.3