Bug#278529: [Bug #278529] resolved with this patch
Clement 'nodens' Hermann
"Clement 'nodens' Hermann" <clement.hermann@free.fr>, 278529@bugs.debian.org
Thu, 10 Mar 2005 16:43:23 +0100
This is a multi-part message in MIME format.
--------------050300010908000504040205
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by spooler2.completel.net id j2AFhNG6014737
Alternatively, you could just remove the "" when testing the file's
existence - it will then interpret *-* correctly.
Then there is no need to use find.
Also, checkfiles() should be called after the option parsing, so you
could do a -h even if stage1 is not found.
See the patch attached.
Best regards,
--=20
Cl=E9ment 'nodens' Hermann <clement.hermann@free.fr>
- L'air pur ? c'est pas en RL, =E7a ? c'est pas hors charte ?
-- Jean in "l'Histoire des Pingouins" - http://tnemeth.free.fr/fmbl/linux=
sf
--------------050300010908000504040205
Content-Type: text/x-patch;
name="grub-floppy.patch"
Content-Disposition: inline;
filename="grub-floppy.patch"
Content-Transfer-Encoding: 7bit
--- grub-floppy.old 2005-03-10 14:50:53.000000000 +0100
+++ grub-floppy 2005-03-10 14:50:10.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Create GRUB boot floppy.
# Copyright (C) 2001 Jason Thomas <jason@debian.org>
@@ -33,9 +33,10 @@
checkfiles()
{
+echo $pkglibdir $stage1
[ -x "$dd" ] || abort "Can't find $dd, aborting"
- [ -f "$stage1" ] || abort "Can't find $stage1, aborting"
- [ -f "$stage2" ] || abort "Can't find $stage2, aborting"
+ [ -f $stage1 ] || abort "Can't find $stage1, aborting"
+ [ -f $stage2 ] || abort "Can't find $stage2, aborting"
}
usage()
@@ -90,9 +91,6 @@
/bin/echo -e "\nThat's All Folks!"
}
-# test we have the necessary files first
-checkfiles
-
case "$1" in
-h | --help)
usage
@@ -102,6 +100,9 @@
if [ -z "$1" ] ; then
usage
else
+ # test we have the necessary files first
+ checkfiles
+
checkdevice "$1"
questiondevice "$1"
createfloppy "$1"
--------------050300010908000504040205--