mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
owsd: hotplug: map aliases against interface on ifup
This commit is contained in:
parent
7f3e3d9c3e
commit
051826305e
1 changed files with 20 additions and 0 deletions
|
|
@ -2,6 +2,19 @@
|
|||
|
||||
[ "$ACTION" = ifup ] || exit 0
|
||||
|
||||
handle_interface() {
|
||||
ifname=$(uci get network.$1.ifname)
|
||||
|
||||
case "$ifname" in
|
||||
@*)
|
||||
alias_interface="$1 $alias_interface"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
config_load network
|
||||
config_foreach handle_interface "interface"
|
||||
|
||||
compare_owsd_iface() {
|
||||
local interface
|
||||
|
||||
|
|
@ -11,6 +24,13 @@ compare_owsd_iface() {
|
|||
/etc/init.d/owsd reload
|
||||
exit
|
||||
fi
|
||||
|
||||
for i in $alias_interface; do
|
||||
if [ "$INTERFACE" == "$i" ]; then
|
||||
/etc/init.d/owsd reload
|
||||
exit
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
config_load owsd
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue