OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Very Low
  • Priority Very Low
  • Reported Version All
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Gandalf - 10.09.2021
Last edited by Jo-Philipp Wich - 19.09.2021

FS#4026 - 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 !

How to reproduce :

root@LPM:~# service syslog-ng stop
root@LPM:~# ps | grep syslog
 1763 root     16056 S    /usr/sbin/rsyslogd -n
 3429 root       872 S    /usr/sbin/addrwatch_syslog
28726 root      1348 R    grep syslog
root@LPM:~# service syslog-ng disable
root@LPM:~# service syslog-ng restart
Command failed: Not found
root@LPM:~# ps | grep syslog
 1763 root     16056 S    /usr/sbin/rsyslogd -n
 3429 root       872 S    /usr/sbin/addrwatch_syslog
28753 root     13316 S    /usr/sbin/syslog-ng --foreground
28765 root      1348 R    grep syslog
root@LPM:~# service syslog-ng stop

Références :
https://github.com/openwrt/packages/issues/16601 https://forum.openwrt.org/t/service-still-restart-start-while-disabled/105996/

Closed by  Jo-Philipp Wich
19.09.2021 17:56
Reason for closing:  Not a bug
Admin
Jo-Philipp Wich commented on 19.09.2021 17:56

Yes, it is intentional / works as implemented. "Disabling" a service merely disable autostart on boot.

Gandalf commented on 19.09.2021 18:03

Okay, 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 !

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing