[Fai-commit] r5910 - in trunk: bin debian

Thomas Lange lange at alioth.debian.org
Thu Jul 29 23:50:21 UTC 2010


Author: lange
Date: 2010-07-29 23:50:20 +0000 (Thu, 29 Jul 2010)
New Revision: 5910

Modified:
   trunk/bin/device2grub
   trunk/debian/changelog
Log:
device2grub: fix indentation, minor code fix

Modified: trunk/bin/device2grub
===================================================================
--- trunk/bin/device2grub	2010-07-29 16:32:48 UTC (rev 5909)
+++ trunk/bin/device2grub	2010-07-29 23:50:20 UTC (rev 5910)
@@ -1,4 +1,6 @@
 #! /usr/bin/perl
+
+# $Id$
 # copyright Thomas Lange 2001-2010, lange at debian.org
 # map "normal" device notation to grub notation
 
@@ -27,22 +29,22 @@
 if ($map{$disk}) {
   $grubdevice=$map{$disk};
 } else {
-    opendir (my $dh, $devbyid) || die "Can't open /dev/disk/by-id\n";
-    while (my $diskid = readdir $dh) {
-	next if ($diskid =~ /[.].*/);
+  opendir (my $dh, $devbyid) || die "Can't open /dev/disk/by-id\n";
 
-	$diskid = $devbyid . "/" . $diskid;
+  while (my $diskid = readdir $dh) {
+    next if ($diskid =~ /[.].*/);
 
-	my $shortdev = abs_path($diskid);
+    $diskid = "$devbyid/$diskid";
+    my $shortdev = abs_path($diskid);
 
-	if (($shortdev eq $disk) && $map{$diskid}) {
-	    $grubdevice = $map{$diskid};
-	    last;
-	}
+    if (($shortdev eq $disk) && $map{$diskid}) {
+      $grubdevice = $map{$diskid};
+      last;
     }
-    closedir $dh;
+  }
 
-    die "No match in $devicemap for $disk\n" unless $grubdevice;
+  closedir $dh;
+  die "No match in $devicemap for $disk\n" unless $grubdevice;
 }
 
 if ($partition) {

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2010-07-29 16:32:48 UTC (rev 5909)
+++ trunk/debian/changelog	2010-07-29 23:50:20 UTC (rev 5910)
@@ -89,6 +89,7 @@
   * fai-mirror: use $mirrordir if no argument given (closes: #428597)
   * get-config-dir-svn: use exit code of first command of pipe
     (closes: #557544)
+  * device2grub: fix indentation, minor code fix
     
   [ Michael Tautschnig ]
   * setup-storage: Bumped version number to 1.3




More information about the Fai-commit mailing list