On 9/6/06, William Zhou <[EMAIL PROTECTED]> wrote:
10.8. Glibc-2.4 64-Bit
cp -v --remove-destination /usr/share/zoneinfo/[xxx] \
/etc/localtime
-> (long parameter is unnecessary)
cp -fv /usr/share/zoneinfo/[xxx] /etc/localtime
Coming in late here.
The --remove-destination is necessary because /etc/localtime is a
symlink. It points to /usr/share/zoneinfo/Factory. If you do cp -fv,
it overwrites Factory with the [xxx] zoneinfo, which is not the
desired effect. The symlink /etc/localtime still points to
/usr/share/zoneinfo/Factory, you've just overwritten Factory. With
--remove-destination, the destination (/etc/localtime) is removed
before attempting to read it. This also solves the problem where /usr
is not mounted (see the note in LFS).
$ ls -l dest/etc/localtime
lrwxrwxrwx 1 dnicholson dnicholson 29 2006-09-11 15:32
dest/etc/localtime -> ../usr/share/zoneinfo/Factory
$ diff -s dest/usr/share/zoneinfo/Factory
dest/usr/share/zoneinfo/America/Los_Angeles
Binary files dest/usr/share/zoneinfo/Factory and
dest/usr/share/zoneinfo/America/Los_Angeles differ
$ cp -fv dest/usr/share/zoneinfo/America/Los_Angeles dest/etc/localtime
cp: overwrite `dest/etc/localtime'? y
`dest/usr/share/zoneinfo/America/Los_Angeles' -> `dest/etc/localtime'
$ ls -l dest/etc/localtime
lrwxrwxrwx 1 dnicholson dnicholson 29 2006-09-11 15:32
dest/etc/localtime -> ../usr/share/zoneinfo/Factory
$ diff -s dest/usr/share/zoneinfo/Factory
dest/usr/share/zoneinfo/America/Los_Angeles
Files dest/usr/share/zoneinfo/Factory and
dest/usr/share/zoneinfo/America/Los_Angeles are identical
$ cp -v --remove-destination
dest/usr/share/zoneinfo/America/Los_Angeles dest/etc/localtime
cp: overwrite `dest/etc/localtime'? y
`dest/usr/share/zoneinfo/America/Los_Angeles' -> `dest/etc/localtime'
$ ls -l dest/etc/localtime
-rw-r--r-- 1 dnicholson dnicholson 1017 2006-09-11 15:42 dest/etc/localtime
--
Dan
_______________________________________________
Clfs-dev mailing list
[email protected]
http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-dev