Service still restart/start while disabled

Is it a normal behaviour that disabled services still start when attempted to ?
A disabled service would not be refused of starting ?
A call to the init.d script may be difficult to manage this particular state, but the service command must do !

thanks to @wulfy23 to point on this : https://github.com/openwrt/packages/issues/16601

https://bugs.openwrt.org/index.php?do=details&task_id=4026

Disabling a service only affects autostart in general case.
This cannot prevent you from starting it manually.

2 Likes

see many services hotplug.d files i.e.;

### [root@dca632 / 46°]# grep enabled /etc/hotplug.d/iface/11-sqm 
[ "$ACTION" = ifup ] && /etc/init.d/sqm enabled && restart_sqm

which can go in your firewall script for quickfix (without the ifup)...

technically one could do a || running to be totally confident it's not running user instantiated but that's overkill for similar packages (and not always reliable)...

Okay, got it ! thanks...

root@LPM:~# cat /etc/firewall.fail2ban 
#!/bin/sh
/etc/init.d/fail2ban enabled && /etc/init.d/fail2ban restart
exit 0

Will workaround and quickfix it !

2 Likes
2 Likes

thanks @vgaetera

1 Like

I'm not sure if I can cherry-pick this for 21.02 without push permission.
You should probably ask @champtar who merged the patch.

I will do if you prefer, it is a "fast" PR...
done : https://github.com/openwrt/packages/pull/16609

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.