From owner-freebsd-bugs Wed Oct 13 4:20: 3 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 221D914CF4 for ; Wed, 13 Oct 1999 04:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id EAA86889; Wed, 13 Oct 1999 04:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Wed, 13 Oct 1999 04:20:01 -0700 (PDT) Message-Id: <199910131120.EAA86889@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Nick Hibma Subject: Re: misc/14300: MAKEDEV requires /usr to be mounted (for chown(1)) Reply-To: Nick Hibma Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR misc/14300; it has been noted by GNATS. From: Nick Hibma To: cemerson+freebsd@chiark.greenend.org.uk Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: misc/14300: MAKEDEV requires /usr to be mounted (for chown(1)) Date: Wed, 13 Oct 1999 13:19:21 +0200 (MET DST) > # ./MAKEDEV wd1s1a > wd1s1[a-h] will be removed, and not recreated as MAKEDEV bombs out when > chown(1) fails to run. A manual mknod is required. > >Fix: > (a) move chown(1) to /bin or /sbin > or > (b) cause MAKEDEV to at least create the nodes (with conservative > permissions) before bombing out. (b) sounds like a worthwhile idea, if (a) is not an option. The diff below contains one line wrapping in line 4. --- MAKEDEV.orig Tue Oct 12 23:41:23 1999 +++ MAKEDEV Wed Oct 13 13:17:35 1999 @@ -174,6 +174,14 @@ echo $(($1 << 25 | ($2 / 32) << 21 | ($2 % 32) << 3 | $3 << 16 | $4)) } +chown() { + if [ -x /usr/sbin/chown ]; then + /usr/sbin/chown "$@" + else + echo skipped /usr/sbin/chown "$@", not found. + fi +} + # Override mknod(2) to add extra handling to it. mknod() { rm -f "$1" || exit 1 -- ISIS/STA, T.P.270, Joint Research Centre, 21020 Ispra, Italy To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message