From owner-freebsd-stable Sun Oct 29 20:12:47 2000 Delivered-To: freebsd-stable@freebsd.org Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (Postfix) with ESMTP id 3051D37B4C5 for ; Sun, 29 Oct 2000 20:12:44 -0800 (PST) Received: from imap.gv.tsc.tdk.com (imap.gv.tsc.tdk.com [192.168.241.198]) by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id UAA24561 for ; Sun, 29 Oct 2000 20:12:43 -0800 (PST) (envelope-from gdonl@tsc.tdk.com) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by imap.gv.tsc.tdk.com (8.9.3/8.9.3) with ESMTP id UAA15023 for ; Sun, 29 Oct 2000 20:12:43 -0800 (PST) (envelope-from Don.Lewis@tsc.tdk.com) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id UAA20892 for stable@FreeBSD.ORG; Sun, 29 Oct 2000 20:12:43 -0800 (PST) From: Don Lewis Message-Id: <200010300412.UAA20892@salsa.gv.tsc.tdk.com> Date: Sun, 29 Oct 2000 20:12:42 -0800 In-Reply-To: <200010300357.TAA20757@salsa.gv.tsc.tdk.com> References: <200010300357.TAA20757@salsa.gv.tsc.tdk.com> X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: stable@FreeBSD.ORG Subject: Re: MAKEDEV on the fixit floppy is worthless Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Oct 29, 7:57pm, Don Lewis wrote: } Subject: MAKEDEV on the fixit floppy is worthless } } If you boot a machine with the kern and mfsroot floppies and then } try to run MAKEDEV from the fixit floppy, you will run into a couple } of problems. } } The first is that MAKEDEV resets $PATH to /sbin:/bin, which doesn't } work too well in this environment, and MAKEDEV won't be able to find } things like expr, which lives in /mnt2/stand. When release/Makefile } installs MAKEDEV on the fixit floppy, it runs sed in attempt to get } rid of this override, but it fails because of a whitepace change in } MAKEDEV, which was introduced when $MAKEDEVPATH was added to MAKEDEV. } } One possible fix is the patch I submitted with the PR misc/21241. } Another would be to set $MAKEDEVPATH. } } Once this problem has been worked around, the next problem is that } MAKEDEV is hardwired to run /sbin/mknod, which hasn't worked in ages } because only exists on the fixit floppy and not on the mfsroot floppy. Now that I think about it some more, I think the correct thing to to is to set $PATH to /sbin:/bin:$PATH, get rid of any other explicit path names in MAKEDEV, and nuke the sed goop in release/Makefile. Index: etc/MAKEDEV =================================================================== RCS file: /home/ncvs/src/etc/MAKEDEV,v retrieving revision 1.243.2.11 diff -u -u -r1.243.2.11 MAKEDEV --- etc/MAKEDEV 2000/10/25 06:51:50 1.243.2.11 +++ etc/MAKEDEV 2000/10/30 04:10:10 @@ -140,11 +140,7 @@ # agpgart AGP interface # -if [ -n "$MAKEDEVPATH" ]; then - PATH="$MAKEDEVPATH" -else - PATH=/sbin:/bin -fi +PATH=/sbin:/bin:$PATH umask 77 # Usage: die exitcode msg @@ -186,8 +182,8 @@ 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 } Index: release/Makefile =================================================================== RCS file: /home/ncvs/src/release/Makefile,v retrieving revision 1.536.2.28 diff -u -u -r1.536.2.28 Makefile --- release/Makefile 2000/10/26 18:58:30 1.536.2.28 +++ release/Makefile 2000/10/30 04:07:16 @@ -580,7 +581,7 @@ @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 \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message