From owner-freebsd-current Sun Mar 31 14:51:03 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id OAA05379 for current-outgoing; Sun, 31 Mar 1996 14:51:03 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id OAA05349 for ; Sun, 31 Mar 1996 14:50:47 -0800 (PST) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id AAA20532 for ; Mon, 1 Apr 1996 00:50:39 +0200 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id AAA28815 for freebsd-current@FreeBSD.org; Mon, 1 Apr 1996 00:50:38 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.4/8.6.9) id AAA01620 for freebsd-current@FreeBSD.org; Mon, 1 Apr 1996 00:41:51 +0200 (MET DST) From: J Wunsch Message-Id: <199603312241.AAA01620@uriah.heep.sax.de> Subject: Re: cvs commit: src/usr.sbin/tzsetup Makefile main.c tzmenu.c To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Mon, 1 Apr 1996 00:41:51 -4600 (MET DST) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) 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 X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL24 ME8a] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk 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. ;-)