diff --git a/olsrd/files/olsrd.hotplug.sh b/olsrd/files/olsrd.hotplug.sh index 6d1641f..db709a8 100755 --- a/olsrd/files/olsrd.hotplug.sh +++ b/olsrd/files/olsrd.hotplug.sh @@ -44,9 +44,11 @@ olsrd_interface_needs_adding() case "$ACTION" in ifup) - /etc/init.d/olsrd enabled && { + # only work after the first normal startup + # also: no need to test, if enabled + [ -e '/var/run/olsrd.pid' ] && { olsrd_interface_needs_adding "$INTERFACE" "$DEVICE" && { - /etc/init.d/olsrd restart + . /etc/rc.common /etc/init.d/olsrd restart } } ;;