]> git.openfabrics.org - ~tnikolova/ofed_scripts/.git/commitdiff
install.pl: extend '-p' option vofed-1.5-rc4
authorVladimir Sokolovsky <vlad@mellanox.co.il>
Tue, 8 Dec 2009 08:40:53 +0000 (10:40 +0200)
committerVladimir Sokolovsky <vlad@mellanox.co.il>
Tue, 8 Dec 2009 08:43:06 +0000 (10:43 +0200)
Now '--basic' or '--hpc' or '--all' can be used along with '-p' option
to get the conf file with corresponding list of packages.

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
install.pl

index fcb9d9fa5cf3f3186637ba1b2cef5ee181f87e08..f5894ffa22a0403002f03d70ab6e49f03a50d8d5 100755 (executable)
@@ -4181,10 +4181,22 @@ sub check_pcie_link
 sub main
 {
     if ($print_available) {
+        my @list = ();
         set_availability();
-        open(CONFIG, ">>$config") || die "Can't open $config: $!";
+        $config = $TMPDIR . "/ofed-$install_option.conf";
+        chomp $config;
+        if ($install_option eq 'all') {
+            @list = (@all_packages, @hidden_packages);
+        }
+        elsif ($install_option eq 'hpc') {
+            @list = (@hpc_user_packages, @hpc_kernel_packages, @hidden_packages);
+        }
+        elsif ($install_option eq 'basic') {
+            @list = (@basic_user_packages, @basic_kernel_packages, @hidden_packages);
+        }
+        open(CONFIG, ">>$config") || die "Can't open $config: $!";;
         flock CONFIG, $LOCK_EXCLUSIVE;
-        for my $package ( @all_packages, @hidden_packages) {
+        for my $package ( @list ) {
             next if (not $packages_info{$package}{'available'});
             if ($package eq "kernel-ib") {
                 print "Kernel modules: ";