symlinks

Paul Jarc prj at po.cwru.edu
Tue Mar 19 16:20:53 UTC 2002


"Olson, Arthur David (NCI)" <olsona at dc37a.nci.nih.gov> wrote:
> Checking the legislative history, I discovered that the item attached below
> is what got the symlink ball rolling.
> What I'm after is something that handles such real-world cases correctly;
> I'm willing to let non-real-world cases slide.
...
> 	The command "zic -l MET" should set the local time zone by
> 	linking the file "/usr/share/zoneinfo/MET" to
> 	"/etc/localtime".  It uses a hard link for this purpose.  On
> 	my system this fails, because the directories "/etc" and
> 	"/usr/share/zoneinfo" are located on different disk partitions
> 	on my system.

In this case, we have an absolute pathname for the pointed-to file, so
there's no danger in making a symlink.  So how about: try hard
linking; if that fails with EXDEV, and if we have a full pathname for
the pointed-to file, use a symlink.  Otherwise give up.  Do we
generally have absolute paths in real-world cases?


paul



More information about the tz mailing list