mirror of
https://git.openwrt.org/feed/routing.git
synced 2025-01-09 04:07:48 +08:00
olsrd: hotplug-script: cleanup/simplify
This commit is contained in:
parent
6bdbd50aaf
commit
8ffcb5e3e5
@ -1,7 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$ACTION" = ifup ] || exit 0
|
||||
/etc/init.d/olsrd enabled || exit 0
|
||||
case "$ACTION" in
|
||||
ifup)
|
||||
/etc/init.d/olsrd enabled && {
|
||||
olsrd_interface_needs_adding "$INTERFACE" "$DEVICE" && {
|
||||
/etc/init.d/olsrd restart
|
||||
}
|
||||
}
|
||||
;;
|
||||
esac
|
||||
|
||||
olsrd_list_configured_interfaces()
|
||||
{
|
||||
@ -44,7 +51,3 @@ olsrd_interface_needs_adding()
|
||||
logger -t olsrd_hotplug -p daemon.debug "[OK] interface $INTERFACE not used for olsrd"
|
||||
return 1
|
||||
}
|
||||
|
||||
olsrd_interface_needs_adding "$INTERFACE" "$DEVICE" && {
|
||||
/etc/init.d/olsrd restart
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user