[systemd-devel] [PATCH v9002 1/2] timedated: gather timezone from /etc/localtime sym target

Frederic Crozat fcrozat at suse.com
Thu Aug 23 05:21:17 PDT 2012


Le mardi 21 août 2012 à 23:11 -0700, Shawn Landden a écrit :

> @@ -218,19 +248,21 @@ static int write_data_timezone(void) {
>                  return r;
>          }
>  
> -        p = strappend("/usr/share/zoneinfo/", tz.zone);
> +        p = strappend(ZONEINFO_PATH, tz.zone);
>          if (!p)
>                  return log_oom();
>  
> -        r = symlink_or_copy_atomic(p, "/etc/localtime");
> +        r = symlink(p, "/etc/localtime");
>          free(p);

It doesn't work when /etc/localtime already exists, because symlink
returns EEXIST. I guess you should put back your symlink_atomic patch..

-- 
Frederic Crozat <fcrozat at suse.com>
SUSE



More information about the systemd-devel mailing list