On Fri, Feb 9, 2024 at 11:11 AM Marc Chamberlin via openSUSE Users <users@lists.opensuse.org> wrote:
I ran into a problem in OpenSuSE 15.5 trying to start the cron.service daemon. It failed because the directory at /etc/cron.d was empty (which in previous releases of OpenSuSE it was not empty). The cron.service file, as supplied from the installation repos, has a couple of ExecStartPre shell commands shown here - (the second ExecStartPre command seems to be redundant, but I don't know that for sure, because I don't know how chmod is suppose to handle recursion and wildchars. Man pages seem unclear about this).
You neither tell what package you installed nor show the actual errors. IIRC Leap is using cronie and its cron.service does not have these commands. Sorry, I didn't know that there were multiple packages that install cron.service and it's unreasonable that you expected me to report what
On 2/9/24 00:19, Andrei Borzenkov wrote: package I installed. I thought it was sufficient to simply report that I am running OpenSuSE 15.5 and whatever package(s) for cron were installed by default. Anywise, I see that both the cron and the cronie packages are installed on my laptop (I wish Yast had a better way to export this information) - cron - Auxiliary package Alternate Version Installed Version Version: 4.2-150400.84.3.1 4.2-150400.84.3.1 Build Time: Wed 18 Jan 2023 01:38:41 AM PST Wed 18 Jan 2023 01:38:41 AM PST Install Time: Mon 11 Dec 2023 07:17:38 AM PST License: BSD-3-Clause AND GPL-2.0-only AND MIT BSD-3-Clause AND GPL-2.0-only AND MIT Installed Size: 181 B 181 B Download Size: 17.5 KiB 0 B Distribution: SUSE Linux Enterprise 15 Vendor: SUSE LLC <https://www.suse.com/> SUSE LLC <https://www.suse.com/> Packager: https://www.suse.com/ https://www.suse.com/ Architecture: x86_64 x86_64 Build Host: sheep52 sheep52 URL: https://github.com/cronie-crond/cronie https://github.com/cronie-crond/cronie Source Package: cronie-1.5.7-150400.84.3.1 cronie-1.5.7-150400.84.3.1 Media No.: 1 0 Authors: cronie - Cron Daemon Alternate Version Installed Version Version: 1.5.7-150400.84.3.1 1.5.7-150400.84.3.1 Build Time: Wed 18 Jan 2023 01:38:41 AM PST Wed 18 Jan 2023 01:38:41 AM PST Install Time: Mon 11 Dec 2023 07:17:38 AM PST License: BSD-3-Clause AND GPL-2.0-only AND MIT BSD-3-Clause AND GPL-2.0-only AND MIT Installed Size: 313.7 KiB 313.7 KiB Download Size: 117.0 KiB 0 B Distribution: SUSE Linux Enterprise 15 Vendor: SUSE LLC <https://www.suse.com/> SUSE LLC <https://www.suse.com/> Packager: https://www.suse.com/ https://www.suse.com/ Architecture: x86_64 x86_64 Build Host: sheep52 sheep52 URL: https://github.com/cronie-crond/cronie https://github.com/cronie-crond/cronie Source Package: cronie-1.5.7-150400.84.3.1 cronie-1.5.7-150400.84.3.1 Media No.: 1 0 Authors: Oh brother! Apparently after rebooting my laptop this morning I can't reproduce the error without commenting out the last ExecStartPre command as directed by the comment just above it. (I had commented it out, before reporting this problem yesterday, and was still getting the same error, hence my wondering if chmod was broken.) As for the actual error reported, it was pretty straightforward - systemctl status cron × cron.service - Command Scheduler Loaded: loaded (/etc/systemd/system/cron.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2024-02-09 10:09:25 PST; 29s ago Process: 10176 ExecStartPre=/bin/sh -c /bin/chmod -R 0744 /etc/cron.* (code=exited, status=0/SUCCESS) Process: 10177 ExecStartPre=/bin/sh -c /bin/chmod -R 0644 /etc/cron.d/* (code=exited, status=1/FAILURE) Feb 09 10:09:25 wa7pxw systemd[1]: Starting Command Scheduler... Feb 09 10:09:25 wa7pxw sh[10177]: /bin/chmod: cannot access '/etc/cron.d/*': No such file or directory Feb 09 10:09:25 wa7pxw systemd[1]: cron.service: Control process exited, code=exited, status=1/FAILURE Feb 09 10:09:25 wa7pxw systemd[1]: cron.service: Failed with result 'exit-code'. Feb 09 10:09:25 wa7pxw systemd[1]: Failed to start Command Scheduler. Regardless, I will argue that my way of starting the cron service is better than the way initially provided by the version of cron.service file that I got from the OpenSuSE 15.5 repository. Using my version of the ExecStartPre and chmod commands does not require the user to comment or uncomment anything in the cron.service file. It works regardless of whether the /etc/cron.d directory is empty or not. Marc...