Date: Mon, 1 Apr 1996 00:41:51 -4600 (MET DST) From: J Wunsch <j@uriah.heep.sax.de> To: freebsd-current@FreeBSD.org (FreeBSD-current users) Subject: Re: cvs commit: src/usr.sbin/tzsetup Makefile main.c tzmenu.c Message-ID: <199603312241.AAA01620@uriah.heep.sax.de> In-Reply-To: <199603312137.BAA00975@astral.msk.su> from "=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=" at Apr 1, 96 01:37:47 am
next in thread | previous in thread | raw e-mail | index | archive | help
As =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= wrote: > > Would the following be agreeable? > > > > if (is_symlink("/etc/localtime")) { > > unlink("/etc/localtime"); > > symlink(zoneinfo, "/etc/localtime"); > > } else { > > copy(zoneinfo, "/etc/localtime"); > > } > Why not simple? > > unlink("/etc/localtime"); > copy(zoneinfo, "/etc/localtime"); Since there are people like me who find: j@uriah 54% ls -l /etc/localtime lrwxr-xr-x 1 root wheel 23 Mar 28 22:26 /etc/localtime@ -> /usr/share/zoneinfo/MET more informative, and don't wanna have it broken by the next run of tzsetup(8). > Basically, having symlink outside /etc is bad idea. > Especially pointing to probably mounted /usr: your system date > can be very damaged when remote NFS hangs on /usr/share f.e. Like /usr/sbin/rmt, or /usr/share/misc/terminfo, you mean? :-) (Funny, these are the only symlinks that are normally be found in /etc, and they all point to /usr.) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603312241.AAA01620>