Change MAKEDEV so that it prepends /sbin:/bin to $PATH instead of totally

overwriting $PATH, and find mknod $PATH instead of hardcoding /sbin so
that the copy of MAKEDEV on the fixit floppy is usable, since mknod and
expr live in /mnt2/stand when the fixit floppy is running.

Get rid of the sed invokation in release/Makefile that attempts to
delete the PATH setting stuff from MAKEDEV on the fixit floppy.  This
hasn't worked since a long ago change to MAKEDEV caused the sed
expression to no longer match.

PR:		misc/21241
This commit is contained in:
Don Lewis 2000-11-05 15:34:58 +00:00
parent 3d122d8e2c
commit d777543987
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68363
2 changed files with 11 additions and 4 deletions

View File

@ -150,7 +150,7 @@
if [ -n "$MAKEDEVPATH" ]; then
PATH="$MAKEDEVPATH"
else
PATH=/sbin:/bin
PATH=/sbin:/bin:$PATH
fi
umask 77
@ -190,11 +190,18 @@ dkminor()
}
# Override mknod(2) to add extra handling to it.
mknod=/sbin/mknod
for i in `IFS=':'; echo $PATH`; do
if [ -x "${i}/mknod" ]; then
mknod="${i}/mknod"
break
fi
done
mknod() {
rm -f "$1" || exit 1
case $# in
4) /sbin/mknod "$@" root:wheel || die 2 "/sbin/mknod $@ failed";;
5) /sbin/mknod "$@" || die 2 "/sbin/mknod $@ failed";;
4) "$mknod" "$@" root:wheel || die 2 "$mknod $@ failed";;
5) "$mknod" "$@" || die 2 "$mknod $@ failed";;
*) die 2 "bad node: mknod $@";;
esac
}

View File

@ -604,7 +604,7 @@ release.9:
@cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=fixit \
DIR=${RD}/fixitfd/stand ZIP=false
@( cd ${RD}/fixitfd/dev && \
sed -e '/^PATH/s/^/#/' ${RD}/trees/bin/dev/MAKEDEV > MAKEDEV && \
cp ${RD}/trees/bin/dev/MAKEDEV MAKEDEV && \
chmod 755 MAKEDEV && \
sh MAKEDEV fixit )
@cp ${RD}/trees/bin/etc/spwd.db ${RD}/trees/bin/etc/group \