Hi,

Two new patches to finish support for cciss.disk file (HP Raid Array).
now, cciss.disk (attached) can be included into oscar-base

As usual, please review my code (I'm perl newbie).

Thoses patches fixes /usr/bin/mksidisk -A --name my_oscarimage --file 
/usr/share/oscar/oscarsamples/cciss.disk
the file 
/var/lib/systemimager/images/my_oscarimage/etc/systemimager/autoinstallscript.conf
 was badly generated (disk section was correct but had no partition defined).

I hope this is the last patche required for cciss.disk support.

BTW, I think it would be good to rewrite 
/usr/lib/systeminstaller/SystemInstaller/Partition/IA.pm as it is mainly 
hardcoded for msdos partition table type and could be more generic (would help 
support for GPT partition tables).
I'll do that when I'll be clever at perl writing.

Regards,

Olivier.

-- 
        Olivier LAHAYE
        CEA Saclay
        DRT-LIST-DETECS-SSTM
+++ /usr/lib/systeminstaller/SystemInstaller/Partition/IA.pm	2009-11-16 15:07:40.000000000 +0100
--- /usr/lib/systeminstaller/SystemInstaller/Partition/IA.pm.orig.2	2009-11-16 14:22:13.000000000 +0100
@@ +115,16 -115,8 @@
                 print AICONF "unit_of_measurement=\"$DISKS{UNITS}\">\n";
                 my $extparcreated=0;
                 # First do the primary partitions
+		# Need rewrite to handle gpt partition type (no primary or extended types)
                 foreach my $parnum (1..4) {
+			# Bad work around to handle /dev/ccis/c#d#p# (handle the "p")
                         my $parname=$disk.$parnum;
+                        my $part5="5";
+                        if ( $disk =~ /\/dev\/cciss\/c[0-9]+d[0-9][0-9]*$/) {
+                                $parname=$disk."p".$parnum;
+				print "Partition name: ".$parname;
+                                $part5="p5";
+                        }
                         if (defined $DISKS{PARTITIONS}{$parname}) {
                                 print AICONF "\t\t<part num=\"$DISKS{PARTITIONS}{$parname}{PNUM}\" ";
                                 print AICONF "size=\"$DISKS{PARTITIONS}{$parname}{SIZE}\" ";
@@ +159,7 -151,7 @@
                                         print AICONF "flags=\"$flags\" ";
                                 }
                                 print AICONF "/>\n";
+                        } elsif ((! $extparcreated )&&(defined $DISKS{PARTITIONS}{$disk.$part5}) ){
-                        } elsif ((! $extparcreated )&&(defined $DISKS{PARTITIONS}{$disk."5"}) ){
                                 print AICONF "\t\t<part num=\"$parnum\" size=\"\*\" ";
                                 print AICONF "p_type=\"extended\" ";
                                 print AICONF "/>\n";

Attachment: systeminstaller-oscar-2.4.6-1_Partition.pm
Description: Perl program

/dev/cciss/c0d0p1        100  ext3  /boot      defaults bootable
/dev/cciss/c0d0p5        512  swap
/dev/cciss/c0d0p6        *    ext3  /          defaults
/dev/shm                 -    tmpfs /dev/shm   defaults
nfs_oscar:/home          -    nfs   /home      rw
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Oscar-devel mailing list
Oscar-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to