Problem: The -E option disables the state script and relies only on ubus
to emit events on state changes. But if odhcp6c is compiled without ubus
support (ENABLE_UBUS flag omitted), odhcp6c has no way to signal state
changes.
Solution: Return an error when -E flag is used and ubus support is
absent.
Signed-off-by: Nicolas BESNARD <nico.besnard31@gmail.com>
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/odhcp6c/pull/106
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
break;
case 'E':
+#ifndef WITH_UBUS
+ syslog(LOG_ERR, "Failed to use ubus event: ENABLE_UBUS compilation flag missing");
+ return 1;
+#endif /* WITH_UBUS */
script = NULL;
break;