]> git.openfabrics.org - ~aditr/ofed_scripts.git/commitdiff
Parse new option in ofed.conf
authorMoni Shoua <monis@Voltaire.COM>
Wed, 17 Feb 2010 14:17:13 +0000 (16:17 +0200)
committerVladimir Sokolovsky <vlad@mellanox.co.il>
Wed, 17 Feb 2010 15:27:04 +0000 (17:27 +0200)
Add parsing of option "bonding_force_all_os" and passing
it to rpmbuild when building ib-bonding. The meaning of this new
option is: build ib-bonding for any OS and override the judgment
in the spec file.

Signed-off-by: Moni Shoua <monis@voltaire.com>
install.pl

index 450c54b55587da2bb050af4e3318e15ec5869995..88ba0c351ac225053c15f88f8b397b553a7a92cc 100755 (executable)
@@ -63,6 +63,7 @@ my $print_available = 0;
 
 my $clear_string = `clear`;
 my $upgrade_open_iscsi = 0;
+my $bonding_force_all_os = 0;
 
 my $vendor_pre_install = "";
 my $vendor_post_install = "";
@@ -2207,6 +2208,13 @@ sub select_packages
                     next;
                 }
 
+                if ($package eq "bonding_force_all_os") {
+                    if ($selected =~ m/[Yy]|[Yy][Ee][Ss]/) {
+                        $bonding_force_all_os = 1;
+                    }
+                    next;
+                }
+
                if (substr($package,0,length("vendor_config")) eq "vendor_config") {
                       next;
                }
@@ -2835,6 +2843,7 @@ sub build_kernel_rpm
     elsif ($name eq 'ib-bonding') {
         $cmd .= " --define 'KVERSION $kernel'";
         $cmd .= " --define '_release $kernel_rel'";
+        $cmd .= " --define 'force_all_os $bonding_force_all_os'";
     }
 
     $cmd .= " --define '_prefix $prefix'";