systemd/drop-timezone.patch
Cristian Rodríguez 7c4db4fa6c Accepting request 131520 from home:fcrozat:branches:Base:System
- Add use_localtime.patch: use /etc/localtime instead of
  /etc/timezone (bnc#773491)
- Add support-suse-clock-sysconfig.patch: read SUSE
  /etc/sysconfig/clock file.
- Add drop-timezone.patch: drop support for /etc/timezone, never
  supported on openSUSE.
- Add journalctl-pager-improvement.patch: better handle output when
  using pager.
- Add fix-enable-disable-boot-initscript.patch: support boot.*
  initscripts for systemctl enable /disable (bnc#746506).

OBS-URL: https://build.opensuse.org/request/show/131520
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=298
2012-08-25 21:03:07 +00:00

49 lines
1.6 KiB
Diff

Index: systemd-44/src/timedate/timedated.c
===================================================================
--- systemd-44.orig/src/timedate/timedated.c
+++ systemd-44/src/timedate/timedated.c
@@ -203,24 +203,18 @@ static int read_data(void) {
free(t);
- r = read_one_line_file("/etc/timezone", &tz.zone);
- if (r < 0) {
- if (r != -ENOENT)
- log_warning("Failed to read /etc/timezone: %s", strerror(-r));
-
#if defined(TARGET_FEDORA) || defined(TARGET_SUSE)
- r = parse_env_file("/etc/sysconfig/clock", NEWLINE,
+ r = parse_env_file("/etc/sysconfig/clock", NEWLINE,
#ifdef TARGET_FEDORA
- "ZONE", &tz.zone,
+ "ZONE", &tz.zone,
#else /* TARGET_SUSE */
- "TIMEZONE", &tz.zone,
+ "TIMEZONE", &tz.zone,
#endif
- NULL);
+ NULL);
- if (r < 0 && r != -ENOENT)
- log_warning("Failed to read /etc/sysconfig/clock: %s", strerror(-r));
+ if (r < 0 && r != -ENOENT)
+ log_warning("Failed to read /etc/sysconfig/clock: %s", strerror(-r));
#endif
- }
have_timezone:
if (isempty(tz.zone)) {
@@ -263,12 +257,6 @@ static int write_data_timezone(void) {
if (r < 0)
return -errno;
- if (stat("/etc/timezone", &st) == 0 && S_ISREG(st.st_mode)) {
- r = write_one_line_file_atomic("/etc/timezone", tz.zone);
- if (r < 0)
- return r;
- }
-
return 0;
}