Skip to content

Commit

Permalink
Exit the timesyncd hook if not on systemd and not executable (Network…
Browse files Browse the repository at this point in the history
…Configuration#398)

Exit the timesyncd hook immediately if not running on a systemd host AND timesyncd is not executable.
  • Loading branch information
perkelix authored Nov 13, 2024
1 parent 371c7c6 commit c710751
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hooks/50-timesyncd.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
if [ ! -d /run/systemd/system ]; then
return
fi
if [ ! -x /lib/systemd/systemd-timesyncd ]; then
return
fi

: ${timesyncd_conf_d:=/run/systemd/timesyncd.conf.d}
timesyncd_conf="${timesyncd_conf_d}/dhcpcd-$ifname.conf"
timesyncd_tmp_d="$state_dir/timesyncd"
Expand Down

0 comments on commit c710751

Please sign in to comment.