Subject: pkg/22049: grub-install fails calling mkdir
To: None <gnats-bugs@gnats.netbsd.org>
From: None <soren@bob.blef.org>
List: netbsd-bugs
Date: 07/03/2003 23:14:10
>Number:         22049
>Category:       pkg
>Synopsis:       grub-install fails calling mkdir
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 04 06:15:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Soren Jacobsen
>Release:        NetBSD 1.6.1
>Organization:
>Environment:
pkgsrc as of 07/03/2003.
>Description:
$bootdir is empty on NetBSD, but grub-install will try to mkdir it, which
results in an error, and grub-install failing completely.
>How-To-Repeat:
grub-install '(hd0)' or some such, watch it fail.
>Fix:
Add patches/patch-ai and make makepatchsum. I guess bump PKGREVISION as well.
This should probably be sent upstream.

$NetBSD$

--- util/grub-install.in.orig	Thu Jul  3 23:01:25 2003
+++ util/grub-install.in	Thu Jul  3 23:03:11 2003
@@ -297,7 +297,7 @@
 # Stage 1.5 does not exist.
 
 # Create the GRUB directory if it is not present.
-test -d "$bootdir" || mkdir "$bootdir" || exit 1
+test -z "$bootdir" || test -d "$bootdir" || mkdir "$bootdir" || exit 1
 test -d "$grubdir" || mkdir "$grubdir" || exit 1
 
 # If --recheck is specified, remove the device map, if present.
>Release-Note:
>Audit-Trail:
>Unformatted: