Univention Bugzilla – Bug 44274
No warning message if UCR variable <service>/autostart=false
Last modified: 2020-07-03 20:51:04 CEST
It took me some time to realize that I could not stop (or start) a service as the corresponding UCR variable was set to <service>/autostart=false. In the lib file /usr/share/univention-config-registry/init-autostart.lib, there is a warning forseen, however, it seems that the script never comes to this point as it exists earlier. We really need to show a warning message if a service is completely disabled.
# systemctl status cron.service ● cron.service - Regular background program processing daemon Loaded: loaded (/lib/systemd/system/cron.service; enabled) Active: active (running) since Di 2017-04-04 17:00:36 CEST; 13min ago Docs: man:cron(8) Main PID: 750 (cron) CGroup: /system.slice/cron.service └─750 /usr/sbin/cron -f ... # ucr set cron/autostart=no Setting cron/autostart File: /etc/cron.d/univention-ucr-cronjobs Module: autostart # service cron stop # service cron status ● cron.service Loaded: masked (/dev/null) Active: inactive (dead) # service cron start Failed to start cron.service: Unit cron.service is masked. # systemctl start cron.service Failed to start cron.service: Unit cron.service is masked BUT # invoke-rc.d start cron - # /etc/init.d/cron start - # sed -ne '/masked/,/masked/p' /lib/lsb/init-functions.d/40-systemd # Don't try to run masked services. Don't check for errors, if # this errors, we'll just call systemctl and possibly explode # there. state=$(systemctl -p LoadState show $service 2>/dev/null) [ "$state" = "LoadState=masked" ] && return 0
Hm... > $ ucr set umc/server/autostart=no > Setting umc/server/autostart > Module: autostart > $ systemctl stop univention-management-console-server.service > Warning: Unit file of univention-management-console-server.service changed on disk, 'systemctl daemon-reload' recommended. > $ ucr set umc/server/autostart=yes > Setting umc/server/autostart > Module: autostart > $ systemctl stop univention-management-console-server.service > Warning: Unit file of univention-management-console-server.service changed on disk, 'systemctl daemon-reload' recommended. > $ ps afx | grep manage > 2762 pts/0 S+ 0:00 \_ grep --color=auto manage > 2494 ? Sl 0:00 /usr/bin/python2.7 /usr/sbin/univention-management-console-web-server start > $ systemctl start univention-management-console-server.service > Warning: Unit file of univention-management-console-server.service changed on disk, 'systemctl daemon-reload' recommended. > $ ps afx | grep manage > 2800 pts/0 S+ 0:00 \_ grep --color=auto manage > 2494 ? Sl 0:00 /usr/bin/python2.7 /usr/sbin/univention-management-console-web-server start > 2783 ? S 0:00 /usr/bin/python2.7 /usr/sbin/univention-management-console-server start
... but I have the same behaviour with cron.
This issue has been filed against UCS 4.2. UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.