diff options
author | Dexter Morgan <dmorgan@mageia.org> | 2012-01-26 11:50:49 +0000 |
---|---|---|
committer | Dexter Morgan <dmorgan@mageia.org> | 2012-01-26 11:50:49 +0000 |
commit | 10aed019838b956868f732b972f4984f132a0d77 (patch) | |
tree | 8bee6c6b7084e721fa98b2ed3f3acaabbeda5c6d | |
parent | ba39a498c91755018b1fa02b212a20cf89885172 (diff) | |
download | drakx-10aed019838b956868f732b972f4984f132a0d77.tar drakx-10aed019838b956868f732b972f4984f132a0d77.tar.gz drakx-10aed019838b956868f732b972f4984f132a0d77.tar.bz2 drakx-10aed019838b956868f732b972f4984f132a0d77.tar.xz drakx-10aed019838b956868f732b972f4984f132a0d77.zip |
make drakclock systemd compatible
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rwxr-xr-x | perl-install/standalone/drakclock | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index b575fb3c2..602d1896a 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- make drakclock systemd compatible + Version 13.79 - 25 January 2012 - silent failure to extract gz modules (for rescue) diff --git a/perl-install/standalone/drakclock b/perl-install/standalone/drakclock index ea39f5305..7b13dd764 100755 --- a/perl-install/standalone/drakclock +++ b/perl-install/standalone/drakclock @@ -25,6 +25,7 @@ $ugtk2::wm_icon = "/usr/share/mcc/themes/default/time-mdk.png"; my $ntpfile = '/etc/ntp.conf'; my $ntpdlock = '/var/lock/subsys/ntpd'; +my $ntpdsystemdlock = '/sys/fs/cgroup/systemd/system/ntpd.service'; my $my_win = ugtk2->new(N("Date, Clock & Time Zone Settings")); @@ -132,6 +133,10 @@ $my_win->{window}->add(gtknew('VBox', border_width => $::isEmbedded ? 0 : 5, chi system(qw(service ntpd stop)); system(qw(/sbin/chkconfig --level 35 ntpd off)); } + elsif (-e $ntpdsystemdlock) { + system(qw(systemctl stop ntpd.service)); + system(qw(systemctl disable ntpd.service)); + } } if ($need_date) { my ($year, $month, $day) = $calendar->get_date; @@ -163,7 +168,7 @@ $time_box->set_direction('ltr'); my $servers = get_server(); $combo_ntpserver->set_popdown_strings(@$servers); -if (-e $ntpfile && -e $ntpdlock) { +if (-e $ntpfile && ( -e $ntpdsystemdlock || -e $ntpdlock)) { $ntp = timezone::ntp_server(); $ntp and ntp_widget_state(1); my $fullntp = $ntp; |