dhcpcd service: clear exit code of exitHook (#24909)

* dhcpcd: clear exit code of exitHook

* dhcpcd: restart ntp server in oneshot in exit-hook

Changed files
+1 -2
nixos
modules
services
networking
+1 -2
nixos/modules/services/networking/dhcpcd.nix
···
# anything ever again ("couldn't resolve ..., giving up on
# it"), so we silently lose time synchronisation. This also
# applies to openntpd.
-
${config.systemd.package}/bin/systemctl try-restart ntpd.service
-
${config.systemd.package}/bin/systemctl try-restart openntpd.service
fi
${cfg.runHook}
···
# anything ever again ("couldn't resolve ..., giving up on
# it"), so we silently lose time synchronisation. This also
# applies to openntpd.
+
${config.systemd.package}/bin/systemctl try-reload-or-restart ntpd.service openntpd.service || true
fi
${cfg.runHook}