diff options
author | truckman <truckman@FreeBSD.org> | 2000-11-05 15:34:58 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2000-11-05 15:34:58 +0000 |
commit | f8f09a580e7c2f2bd8e795e50b0a43b33917ea4a (patch) | |
tree | 655e6edef75724f51340342913fceeabe6bbb9f4 /etc/MAKEDEV | |
parent | 26690141b4259c56d15afa46616002f9768ab9f2 (diff) | |
download | FreeBSD-src-f8f09a580e7c2f2bd8e795e50b0a43b33917ea4a.zip FreeBSD-src-f8f09a580e7c2f2bd8e795e50b0a43b33917ea4a.tar.gz |
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
Diffstat (limited to 'etc/MAKEDEV')
-rw-r--r-- | etc/MAKEDEV | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/etc/MAKEDEV b/etc/MAKEDEV index 5f18ae3..a7d14c8 100644 --- a/etc/MAKEDEV +++ b/etc/MAKEDEV @@ -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 } |