Skip to content

Commit

Permalink
Use the ntp support for 'systemd-timesyncd.service' too
Browse files Browse the repository at this point in the history
Newer systemds (≥ 216) don't support any other name, but we keep working
for ntp.service too for compatibility with old versions.
  • Loading branch information
iainlane committed Dec 8, 2014
1 parent 78167b3 commit 6c3d975
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/unit.c
Expand Up @@ -37,7 +37,8 @@ lookup_unit (const gchar *unit_name,
{
Unit *unit = NULL;

if (g_str_equal (unit_name, "ntpd.service"))
if (g_str_equal (unit_name, "ntpd.service") ||
g_str_equal (unit_name, "systemd-timesyncd.service"))
unit = ntp_unit_get ();

if (g_str_equal (unit_name, "suspend.target"))
Expand Down

0 comments on commit 6c3d975

Please sign in to comment.