OK, thanks, it has been very helpful! The problem was that the cloning
process was not able to handle the LABELs in swap partitions. Now it
should be fixed in trunk.. if you want to test it the patch is attached,
maybe you can apply it directly into your installed version (in this
case remember to patch both your golden client and image server).

Otherwise the last RPMs of the trunk are available here:
http://download.systemimager.org/~arighi/systemimager/

-Andrea

Mark Seger wrote:
> here it is...
> 
> [EMAIL PROTECTED] ~]# cat /etc/fstab
> # This file is edited by fstab-sync - see 'man fstab-sync' for details
> LABEL=/ /       ext3    defaults        1       1
> LABEL=/boot     /boot   ext3    defaults        1       2
> none    /dev/pts        devpts  gid=5,mode=620  0       0
> none    /dev/shm        tmpfs   defaults        0       0
> none    /proc   proc    defaults        0       0
> none    /sys    sysfs   defaults        0       0
> LABEL=SW-cciss/c0d0p2   swap    swap    defaults        0       0
> /dev/hda                /media/cdrom            auto   
> pamconsole,exec,noauto,managed 0 0
> /dev/fd0                /media/floppy           auto   
> pamconsole,exec,noauto,managed 0 0
> 
> -mark
> 
--- /usr/lib/systemimager/perl/SystemImager/Server.pm.orig
+++ /usr/lib/systemimager/perl/SystemImager/Server.pm
@@ -1277,9 +1277,16 @@
 
         # swap
         if ( $xml_config->{fsinfo}->{$line}->{fs} eq "swap" ) {
+            my $label = '';
+            if ($mount_dev) {
+                # add LABEL if necessary
+                if ($mount_dev =~ /LABEL=(.*)/) {
+                    $label = "-L $1";
+                }
+            }
 
             # create swap
-            $cmd = "mkswap -v1 $real_dev || shellout";
+            $cmd = "mkswap -v1 $label $real_dev || shellout";
             print $out qq(logmsg "$cmd"\n);
             print $out "$cmd\n";

--- /usr/lib/systemimager/perl/SystemImager/Common.pm.orig
+++ /usr/lib/systemimager/perl/SystemImager/Common.pm
@@ -63,6 +63,7 @@
     open (FH, "$cmd|") or croak("Couldn't execute $cmd to read the output.");
         while (<FH>) {
             my ($dev, $type, $size, $used, $priority) = split;
+            next if ($dev eq 'Filename');
             $active_swaps_by_dev{$dev}=1;
     }
     close(FH);
@@ -1232,12 +1233,32 @@
                     #
                     $real_dev = $mount_dev;
                     $mount_dev = "";
+                } else {
+                    unless ($real_dev) {
+                        # Try to identify real_dev from the LABEL or UUID value.
+                        chomp($real_dev = `blkid -t $mount_dev`);
+                        $real_dev =~ s/^(.*): .*$/$1/;
+                    }
                 }
                 
+                # Skip device if couldn't identify real_dev. -AR-
+                unless ($real_dev) {
+                    print << "EOF";
+
+WARNING: unable to identify the device with "$mount_dev" defined in
+         $file!
+
+         Manually set the "real_dev" and "format" attributes in
+         "$auto_install_script" to properly create this device
+         during the autoinstall process. 
+
+EOF
+                }
+
                 if ($mounted_devs_by_mount_point{$mp}) {
                     $mounted = "true";
-                } elsif ($active_swaps_by_dev{$real_dev}) {
-                    $mounted = "true";
+                } elsif ($real_dev) {
+                    $mounted = "true" if ($active_swaps_by_dev{$real_dev});
                 }
 
                 # Some of the info we gather can only be gathered for mounted
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sisuite-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to