[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug patch for mkbimage: response requested for Debian bug #352731
From: |
Jason Thomas |
Subject: |
Re: Bug patch for mkbimage: response requested for Debian bug #352731 |
Date: |
Thu, 7 Dec 2006 08:41:35 +1100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
This patch makes perfect sense. Instead of hard coding the loop device,
use the appropriate command 'losetup -f' to find the next free loop
device.
I think you needed to explain your patch better.
Oh well, I vote to include it.
On Wed, Dec 06, 2006 at 09:54:32AM +0100, Mats Erik Andersson wrote:
> Guardians of Grub,
>
> on October 19th I sent an elementary patch to fix the script mkbimage of
> grub. Now one of the Debian maintainers responsible for grub, Otavio
> Salvador <address@hidden>, is desiring your comments on this
> suggested change and he urged me as the author to "ping" you on this
> matter. Presumably he does this before deciding on a onesided patching
> within Debian. Hence, do respond.
>
> I include the difference file once more.
>
> Regards
> Mats Erik Andersson, PhD
> # dev-loop_indep_mkbimage.diff
> #
> # The dependency of a loop-device is made dynamic,
> # instead of statically using /dev/loop1.
> #
> # Mats Erik Andersson <address@hidden>
> #
> diff -Naur grub-0.97.orig/util/mkbimage grub-0.97.patched/util/mkbimage
> --- grub-0.97.orig/util/mkbimage 2004-07-24 20:57:31.000000000 +0200
> +++ grub-0.97.patched/util/mkbimage 2006-10-06 12:57:21.609356256 +0200
> @@ -149,9 +149,10 @@
> if [ "$offset" = "0" ] ; then
> mkfs.$fs -F $image
> elif [ `id -u` = "0" ] ; then
> - losetup $lo_options /dev/loop1 $image
> - mkfs.$fs /dev/loop1
> - losetup -d /dev/loop1
> + temp_loop=$(losetup -f)
> + losetup $lo_options $temp_loop $image
> + mkfs.$fs $temp_loop
> + losetup -d $temp_loop
> else
> error must_be_root
> fi
> @@ -185,13 +186,14 @@
> $cp ${image}1/$file ${image}:$file
> done
> elif [ "`id -u`" = "0" ] ; then
> - losetup $lo_options /dev/loop1 $image
> + temp_loop=$(losetup -f)
> + losetup $lo_options $temp_loop $image
> mkdir ${image}.mnt
> - mount -t $fs /dev/loop1 ${image}.mnt
> + mount -t $fs $temp_loop ${image}.mnt
> cp -a ${image}1/* ${image}.mnt/ && sync
> umount ${image}.mnt
> rmdir ${image}.mnt
> - losetup -d /dev/loop1
> + losetup -d $temp_loop
> else
> error must_be_root
> fi
> _______________________________________________
> Bug-grub mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-grub
--
Jason Thomas
Network Engineer
Link Innovations - 02 9634 0400
http://www.linkinnovations.com/