Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check for systemd before running the timesyncd exit hook. #398

Open
perkelix opened this issue Nov 2, 2024 · 0 comments
Open

check for systemd before running the timesyncd exit hook. #398

perkelix opened this issue Nov 2, 2024 · 0 comments

Comments

@perkelix
Copy link
Contributor

perkelix commented Nov 2, 2024

As per Debian bug, it would be desirable to start the timesyncd hook with something that checks for the presence of timesyncd and, if NOT found, immediately exits the hook.

Debian's dhclient exit hook might provide a good starting point:

if [ ! -d /run/systemd/system ]; then
	return
fi
if [ ! -x /lib/systemd/systemd-timesyncd ]; then
	return
fi
@perkelix perkelix changed the title check for presence of systemd before running the exit hook. check for systemd before running the timesyncd exit hook. Nov 2, 2024
perkelix added a commit to perkelix/dhcpcd that referenced this issue Nov 13, 2024
…Configuration#398)

Exit the timesyncd hook immediately if not running on a systemd host AND timesyncd is not executable.
rsmarples pushed a commit that referenced this issue Dec 8, 2024
…403)

Exit the timesyncd hook immediately if not running on a systemd host AND timesyncd is not executable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant