1 Index: applets/clock/system-timezone.c
2 ===================================================================
3 --- applets/clock/system-timezone.c (revision 11072)
4 +++ applets/clock/system-timezone.c (working copy)
6 #include "system-timezone.h"
8 /* Files that we look at and that should be monitored */
10 -#define ETC_TIMEZONE "/etc/timezone"
11 -#define ETC_TIMEZONE_MAJ "/etc/TIMEZONE"
12 -#define ETC_RC_CONF "/etc/rc.conf"
13 -#define ETC_SYSCONFIG_CLOCK "/etc/sysconfig/clock"
14 -#define ETC_CONF_D_CLOCK "/etc/conf.d/clock"
15 -#define ETC_LOCALTIME "/etc/localtime"
17 +#define ETC_TIMEZONE "/etc/timezone"
18 +#define ETC_TIMEZONE_MAJ "/etc/TIMEZONE"
19 +#define ETC_RC_CONF "/etc/rc.conf"
20 +#define ETC_SYSCONFIG_CLOCK "/etc/sysconfig/clock"
21 +#define ETC_SYSCONFIG_TIMEZONE "/etc/sysconfig/timezone"
22 +#define ETC_CONF_D_CLOCK "/etc/conf.d/clock"
23 +#define ETC_LOCALTIME "/etc/localtime"
25 /* The first 4 characters in a timezone file, from tzfile.h */
26 #define TZ_MAGIC "TZif"
31 + ETC_SYSCONFIG_TIMEZONE,
36 * openSUSE: the TIMEZONE key in /etc/sysconfig/clock
37 * Solaris/OpenSolaris: the TZ key in /etc/TIMEZONE
38 * Arch Linux: the TIMEZONE key in /etc/rc.conf
39 + * PLD Linux: the TIMEZONE key in /etc/sysconfig/timezone
40 * Gentoo (old): the ZONE key in /etc/conf.d/clock
42 * FIXME: reading the system-tools-backends, it seems there's this too:
47 +/* This works for PLD Linux */
49 +system_timezone_read_etc_sysconfig_timezone (void)
51 + return system_timezone_read_key_file (ETC_SYSCONFIG_TIMEZONE,
56 +system_timezone_write_etc_sysconfig_timezone (const char *tz,
59 + return system_timezone_write_key_file (ETC_SYSCONFIG_TIMEZONE,
60 + "TIMEZONE", tz, error);
63 /* This works for openSUSE */
65 system_timezone_read_etc_sysconfig_clock_alt (void)
67 system_timezone_read_etc_sysconfig_clock_alt,
68 system_timezone_read_etc_TIMEZONE,
69 system_timezone_read_etc_rc_conf,
70 + system_timezone_read_etc_sysconfig_timezone,
71 /* reading deprecated config files */
72 system_timezone_read_etc_conf_d_clock,
73 /* reading /etc/timezone directly. Expensive since we have to stat
75 system_timezone_write_etc_sysconfig_clock_alt,
76 system_timezone_write_etc_TIMEZONE,
77 system_timezone_write_etc_rc_conf,
78 + system_timezone_write_etc_sysconfig_timezone,
79 /* writing deprecated config files if they exist and have the
80 * setting already present */
81 system_timezone_write_etc_conf_d_clock,