changed structure in image-* dir stable
authorHeiko Schlittermann <hs@schlittermann.de>
Wed, 20 Jan 2010 08:53:01 +0100
branchstable
changeset 21 b99dbfa83db2
parent 20 998ccc03375b
child 22 9a65fac4c661
changed structure in image-* dir
si
--- a/si	Wed Jan 20 08:49:21 2010 +0100
+++ b/si	Wed Jan 20 08:53:01 2010 +0100
@@ -46,7 +46,7 @@
         remove_tree($dir);
         -d $dir or mkdir($dir, 0700) or die "Can't mkdir $dir: $!\n";
     }
-    make_path(map { "$dir/$_" } qw(ptable lvm blkid mbr dump));
+    make_path(map { "$dir/$_" } qw(info ptable lvm blkid mbr dump));
 
     SI::ptable::volumes("$dir/ptable/%s", %devices);
     die Dumper \%devices if $opt_exit =~ /ptable/;
@@ -70,8 +70,10 @@
     unlink("../image-$id{name}") if -l "../image-$id{name}";
     symlink(basename($dir), "../image-$id{name}");
 
-    print {new IO::File ">$dir/devices"} Dumper \%devices
-      or die "ERR: Can't open $dir/devices: $!\n";
+    print {new IO::File ">$dir/info/mac"} "$id{mac}\n";
+    print {new IO::File ">$dir/info/name"} "$id{name}\n";
+    print {new IO::File ">$dir/info/devices"} Dumper \%devices
+      or die "ERR: Can't open $dir/info/devices: $!\n";
 
     SI::dumper::dump("$dir/dump/%s", %devices);