2021-10-05 06:50:40 |
Frank Chung |
description |
In Raspbian filesystems that do have /opt, attempting to start systemd service for htpdate results in the following error in syslog:
Sep 24 10:02:59 raspberrypi systemd[1]: Starting HTTP based time synchronization tool...
Sep 24 10:02:59 raspberrypi systemd[4405]: htpdate.service: Failed to set up mount namespacing: /run/systemd/unit-root/opt: No such file or directory
Sep 24 10:02:59 raspberrypi systemd[4405]: htpdate.service: Failed at step NAMESPACE spawning /usr/sbin/htpdate: No such file or directory
Sep 24 10:02:59 raspberrypi systemd[1]: htpdate.service: Control process exited, code=exited, status=226/NAMESPACE
Sep 24 10:02:59 raspberrypi systemd[1]: htpdate.service: Failed with result 'exit-code'.
Sep 24 10:02:59 raspberrypi systemd[1]: Failed to start HTTP based time synchronization tool.
The problem can be worked around by either creating /opt directory or editing the InaccessibleDirectories option in /usr/lib/systemd/system/htpdate.service to make /opt optional, i.e.
change:
InaccessibleDirectories=/boot /home /media /mnt /root /opt /srv
to:
InaccessibleDirectories=/boot /home /media /mnt /root -/opt /srv
systemd version: 247.9-1+rpi1
htpdate version: 1.2.6+git20210903.a3c428a-2 |
In Raspbian filesystems that do not have /opt, attempting to start systemd service for htpdate results in the following error in syslog:
Sep 24 10:02:59 raspberrypi systemd[1]: Starting HTTP based time synchronization tool...
Sep 24 10:02:59 raspberrypi systemd[4405]: htpdate.service: Failed to set up mount namespacing: /run/systemd/unit-root/opt: No such file or directory
Sep 24 10:02:59 raspberrypi systemd[4405]: htpdate.service: Failed at step NAMESPACE spawning /usr/sbin/htpdate: No such file or directory
Sep 24 10:02:59 raspberrypi systemd[1]: htpdate.service: Control process exited, code=exited, status=226/NAMESPACE
Sep 24 10:02:59 raspberrypi systemd[1]: htpdate.service: Failed with result 'exit-code'.
Sep 24 10:02:59 raspberrypi systemd[1]: Failed to start HTTP based time synchronization tool.
The problem can be worked around by either creating /opt directory or editing the InaccessibleDirectories option in /usr/lib/systemd/system/htpdate.service to make /opt optional, i.e.
change:
InaccessibleDirectories=/boot /home /media /mnt /root /opt /srv
to:
InaccessibleDirectories=/boot /home /media /mnt /root -/opt /srv
systemd version: 247.9-1+rpi1
htpdate version: 1.2.6+git20210903.a3c428a-2 |
|