Date: Sun, 29 Oct 2000 20:12:42 -0800 From: Don Lewis <Don.Lewis@tsc.tdk.com> To: stable@FreeBSD.ORG Subject: Re: MAKEDEV on the fixit floppy is worthless Message-ID: <200010300412.UAA20892@salsa.gv.tsc.tdk.com> In-Reply-To: <200010300357.TAA20757@salsa.gv.tsc.tdk.com> References: <200010300357.TAA20757@salsa.gv.tsc.tdk.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010300412.UAA20892>
