/[smeserver]/rpms/e-smith-ntp/sme8/e-smith-ntp-1.16.0-hwsync.patch
ViewVC logotype

Contents of /rpms/e-smith-ntp/sme8/e-smith-ntp-1.16.0-hwsync.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Tue Oct 7 18:47:10 2008 UTC (16 years ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
FILE REMOVED
New streams

1 diff -Nur -x '*.orig' -x '*.rej' e-smith-ntp-1.16.0/root/etc/e-smith/db/configuration/defaults/ntpd/SyncToHWClockSupported mezzanine_patched_e-smith-ntp-1.16.0/root/etc/e-smith/db/configuration/defaults/ntpd/SyncToHWClockSupported
2 --- e-smith-ntp-1.16.0/root/etc/e-smith/db/configuration/defaults/ntpd/SyncToHWClockSupported 1969-12-31 17:00:00.000000000 -0700
3 +++ mezzanine_patched_e-smith-ntp-1.16.0/root/etc/e-smith/db/configuration/defaults/ntpd/SyncToHWClockSupported 2007-01-16 09:07:15.000000000 -0700
4 @@ -0,0 +1 @@
5 +yes
6 diff -Nur -x '*.orig' -x '*.rej' e-smith-ntp-1.16.0/root/etc/e-smith/db/configuration/migrate/30NTPRunDisconnected mezzanine_patched_e-smith-ntp-1.16.0/root/etc/e-smith/db/configuration/migrate/30NTPRunDisconnected
7 --- e-smith-ntp-1.16.0/root/etc/e-smith/db/configuration/migrate/30NTPRunDisconnected 1969-12-31 17:00:00.000000000 -0700
8 +++ mezzanine_patched_e-smith-ntp-1.16.0/root/etc/e-smith/db/configuration/migrate/30NTPRunDisconnected 2007-01-16 09:06:49.000000000 -0700
9 @@ -0,0 +1,7 @@
10 +{
11 + my $ntpd = $DB->get('ntpd');
12 + return unless $ntpd;
13 + return if $ntpd->prop('SyncToHWClockSupported');
14 +
15 + $ntpd->set_prop('status', 'enabled') unless ($ntpd->prop('status') || 'disabled') eq 'enabled';
16 +}
17 diff -Nur -x '*.orig' -x '*.rej' e-smith-ntp-1.16.0/root/etc/e-smith/templates/etc/ntp.conf/00timeServer mezzanine_patched_e-smith-ntp-1.16.0/root/etc/e-smith/templates/etc/ntp.conf/00timeServer
18 --- e-smith-ntp-1.16.0/root/etc/e-smith/templates/etc/ntp.conf/00timeServer 2004-10-19 04:51:14.000000000 -0600
19 +++ mezzanine_patched_e-smith-ntp-1.16.0/root/etc/e-smith/templates/etc/ntp.conf/00timeServer 2007-01-16 09:03:08.000000000 -0700
20 @@ -1,6 +1,7 @@
21 {
22 # vim: ft=perl:
23 - my $server = $ntpd{NTPServer};
24 + my $server = $ntpd{NTPServer} || '';
25 + return "# sync to hw clock" if $server =~ m#^\s*$#;
26
27 if ($server =~ /pool.ntp.org/)
28 {
29 diff -Nur -x '*.orig' -x '*.rej' e-smith-ntp-1.16.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/datetime.pm mezzanine_patched_e-smith-ntp-1.16.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/datetime.pm
30 --- e-smith-ntp-1.16.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/datetime.pm 2007-01-16 09:35:18.000000000 -0700
31 +++ mezzanine_patched_e-smith-ntp-1.16.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/datetime.pm 2007-01-16 09:35:01.000000000 -0700
32 @@ -166,7 +166,7 @@
33
34 if ($rec and $rec->prop('status') eq "enabled")
35 {
36 - $ntpEnabled = 1;
37 + $ntpEnabled = 1 unless ($rec->prop('SyncToHWClockSupported') || 'yes') eq 'yes' and $oldNTPServer =~ m#^\s*$#;
38 }
39
40
41 @@ -345,8 +345,10 @@
42 my $ntpd = $conf->get('ntpd');
43 $conf->close();
44
45 + my $hwSync = $ntpd->prop('SyncToHWClockSupported') || 'yes';
46 +
47 my $oldNtpServer = $ntpd->prop('NTPServer') || '';
48 - my $oldNtpStatus = $ntpd->prop('status') || 'disabled';
49 + my $oldNtpStatus = ($hwSync eq 'yes' and $oldNtpServer =~ m#^\s*$#) ? 'disabled' : ($ntpd->prop('status') || 'disabled');
50
51 my $newNtpServer = $q->param('ntpServer') || '';
52 my $newNtpStatus = $q->param('ntpStatus') || '';
53 @@ -687,13 +689,13 @@
54 my $rec = $conf->get('ntpd');
55 if ($rec)
56 {
57 - $rec->set_prop('status','disabled');
58 + $rec->set_prop('status', ($rec->prop('SyncToHWClockSupported') || 'yes') eq 'yes' ? 'enabled' : 'disabled');
59 $rec->set_prop('NTPServer','');
60 }
61 else
62 {
63 $rec = $conf->new_record('ntpd',
64 - {type=>'service', status=>'disabled', NTPServer=>''});
65 + {type=>'service', status=>'enabled', SyncToHWClockSupported => 'yes', NTPServer=>''});
66 }
67 $conf->get('UnsavedChanges')->set_value($old);
68
69 @@ -730,19 +732,16 @@
70 else
71 {
72 $rec = $conf->new_record('ntpd',
73 - {type=>'service',status=>'enabled',NTPServer=>$ntpServer});
74 + {type=>'service',status=>'enabled',SyncToHWClockSupported => 'yes',NTPServer=>$ntpServer});
75 }
76 $conf->get('UnsavedChanges')->set_value($old);
77
78 - if ($ntpServer !~ /^\s*$/)
79 - {
80 - $msg = 'SETTINGS_CHANGED';
81 - }
82 - else
83 + $msg = 'SETTINGS_CHANGED';
84 + if ($ntpServer =~ /^\s*$/)
85 {
86 - $rec->set_prop('status', 'disabled');
87 + $rec->set_prop('status', ($rec->prop('SyncToHWClockSupported') || 'yes') eq 'yes' ? 'enabled' : 'disabled');
88 $rec->set_prop('NTPServer', '');
89 - $msg = 'INVALID_NTP_SERVER';
90 + $msg = 'INVALID_NTP_SERVER' if ($rec->prop('SyncToHWClockSupported') || 'yes') ne 'yes';
91 }
92
93 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed