[Pkg-sysvinit-devel] Strange redirection in mountnfs.sh
Thomas Hood
jdthood at yahoo.co.uk
Thu Jan 5 11:20:27 UTC 2006
In mountnfs.sh, after reading through fstab, the script does the following:
exec 0>&1
That is, file descriptor 0 (stdin) is made a copy of file descriptor 1 (stdout)!
I don't understand this. Is it a mistake?
Background: I am studying mountnfs.sh because I am hoping to speed it up by replacing:
(
...
) < /etc/fstab
with:
exec 9<&0 < /etc/fstab
...
exec 0<&9 9<&-
which is what checkroot.sh does. This would eliminate an unnecessary subprocess.
--
Thomas
More information about the Pkg-sysvinit-devel
mailing list