Subject: misc/5010: sysinst upgrade needs symlinks in / to match /mnt's
To: None <gnats-bugs@gnats.netbsd.org>
From: Simon J. Gerraty <sjg@quick.com.au>
List: netbsd-bugs
Date: 02/18/1998 01:11:43
>Number:         5010
>Category:       misc
>Synopsis:       sysinst upgrade needs symlinks in / to match /mnt's
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 17 15:50:02 1998
>Last-Modified:
>Originator:     Simon J. Gerraty
>Organization:
Zen Programming...
>Release:        1.3
>Environment:
	
System: NetBSD zen.quick.com.au 1.3 NetBSD 1.3 (ZEN) #1: Sun Feb 15 23:38:24 EST 1998 root@zen.quick.com.au:/u0/usr/src/sys/arch/i386/compile/ZEN i386


>Description:
	
sysinst does a good job (better than I expected) of handling the original
fstab when upgrading.  Ie. it mounts all the fs's in the original hierarchy
under /mnt.

This works fine unless there are symlinks like /usr/local -> /abc/xyz
This is not an easy thing to deal with, but making symlinks in / for
each dir or symlink in /mnt that does not already exist in / would
go a long way to fixing it.  Eg. if /mnt/abc existed and /abc -> /mnt/abc
things would just work.
>How-To-Repeat:
	
Create /usr/local -> /share/arch/NetBSD/i386
and then try upgrading.

>Fix:
	
cd /
for x in /mnt/*
do
	test -d $x -o -h $x || continue
	b=`basename $x`
	test -e $b || ln -s $x .
done

>Audit-Trail:
>Unformatted: