projects
/
feed
/
routing.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bdbd50
)
olsrd: hotplug-script: cleanup/simplify
author
Bastian Bittorf
<bittorf@bluebottle.com>
Wed, 25 Sep 2013 13:30:15 +0000
(15:30 +0200)
committer
Bastian Bittorf
<bittorf@bluebottle.com>
Wed, 25 Sep 2013 13:30:44 +0000
(15:30 +0200)
olsrd/files/olsrd.hotplug.sh
patch
|
blob
|
history
diff --git
a/olsrd/files/olsrd.hotplug.sh
b/olsrd/files/olsrd.hotplug.sh
index 467156f5e13bf0a2f57af299a2c9ec0925fa30a9..8d887377db70945c53adf48f851bff460dc916ad 100755
(executable)
--- a/
olsrd/files/olsrd.hotplug.sh
+++ b/
olsrd/files/olsrd.hotplug.sh
@@
-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
-}