Fix previous:

*	Restore previous functionality which supported running postinstall
	with an extracted etc.tgz set as the "source" directory (i.e,
	/usr/src isn't available).  We do this by generating the MAKEDEV
	to ${SCRATCHDIR} if the real source is available, and leverage off
	the compare_dir() code that the rest of postinstall uses to support
	this functionality.

    *	Don't special case MACHINE_ARCH==arm; the MAKEDEV.awk should
	be doing that since etc/Makefile doesn't have similar special
	case code.  In any case, AFAICT the only MACHINE_ARCHs are
	"arm" and "armeb"; there is no "armel" in NetBSD.
This commit is contained in:
lukem 2003-10-26 23:08:29 +00:00
parent 4784db999a
commit 3d29fcd1f7
1 changed files with 10 additions and 12 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: postinstall,v 1.62 2003/10/26 21:57:11 jdolecek Exp $
# $NetBSD: postinstall,v 1.63 2003/10/26 23:08:29 lukem Exp $
#
# Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
# All rights reserved.
@ -603,20 +603,18 @@ do_makedev()
{
[ -n "$1" ] || err 2 "USAGE: do_makedev fix|check"
# for MAKEDEV.awk, it only matters if MACHINE_ARCH is 'arm' or not
if [ "${MACHINE_ARCH}" = "armeb" -o "${MACHINE_ARCH}" = "armel" \
-o "${MACHINE_ARCH}" = "arm" ]; then
maarch="arm"
else
maarch="X"
if [ -f "${SRC_DIR}/etc/MAKEDEV.tmpl" ]; then
# generate MAKEDEV from source if source is available
MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} awk \
-v ETCDIR="${SRC_DIR}/etc" -f ${SRC_DIR}/etc/MAKEDEV.awk \
${SRC_DIR}/etc/MAKEDEV.tmpl > ${SCRATCHDIR}/MAKEDEV
fi
# generate MAKEDEV to scratchdir
MACHINE=${MACHINE} MACHINE_ARCH=${maarch} \
awk -v ETCDIR="${SRC_DIR}/etc" -f ${SRC_DIR}/etc/MAKEDEV.awk \
${SRC_DIR}/etc/MAKEDEV.tmpl > ${SCRATCHDIR}/MAKEDEV
find_file_in_dirlist MAKEDEV "MAKEDEV" \
${SCRATCHDIR} ${SRC_DIR}/dev \
|| return 1
compare_dir $1 ${SCRATCHDIR} ${DEST_DIR}/dev 555 MAKEDEV || return 1
compare_dir $1 ${dir} ${DEST_DIR}/dev 555 MAKEDEV || return 1
}
#