- Timestamp:
- Oct 7, 2012, 6:07:09 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r1649 r1651 2342 2342 # For VE we need to change the owner manually 2343 2343 if ($cmt =~ /^VE/) { 2344 my $res = pb_system("$shcmdroot sed -i '/requiretty/d' /etc/sudoers","Removing potential requiretty in sudoers" );2344 my $res = pb_system("$shcmdroot sed -i '/requiretty/d' /etc/sudoers","Removing potential requiretty in sudoers","quiet"); 2345 2345 pb_system("$shcmdroot sed '/requiretty/d' /etc/sudoers > /tmp/sudoers.new ; mv /tmp/sudoers.new $tpdir/tmp/sudoers.new ; $shcmdroot mv /tmp/sudoers.new /etc/sudoers","Removing again potential requiretty in sudoers as sed -i failed") if (($res ne 0) && (-f "$tpdir/etc/sudoers")); 2346 2346 pb_system("$shcmd \"sudo $chowncommand -R $mac $tdir\"","Adapt owner in $tdir to $mac"); … … 2528 2528 my $pbos = pb_distro_get_context($v); 2529 2529 2530 my $ftp_proxy = pb_distro_get_param($pbos,pb_conf_get_if("ftp_proxy")); 2531 my $http_proxy = pb_distro_get_param($pbos,pb_conf_get_if("http_proxy")); 2532 2533 $ENV{ftp_proxy} ||= $ftp_proxy if ((defined $ftp_proxy) && ($ftp_proxy ne "")); 2534 $ENV{http_proxy} ||= $http_proxy if ((defined $http_proxy) && ($http_proxy ne "")); 2530 pb_apply_conf_proxy($pbos); 2535 2531 2536 2532 # Launch the VMs/VEs … … 3084 3080 EOF 3085 3081 my $ppref = "our"; 3086 $ppref = "my" if (($pbos->{'name'} =~ / redhat/) && ($pbos->{'version'} =~ /^6/));3082 $ppref = "my" if (($pbos->{'name'} =~ /^redhat/) && ($pbos->{'version'} =~ /^6/)); 3087 3083 print SCRIPT << "EOF"; 3088 $ppref \$pbdebug ;3084 $ppref \$pbdebug = $pbdebug; 3089 3085 $ppref \$pbLOG; 3090 3086 $ppref \$pbsynmsg = "pbscript"; … … 3132 3128 } elsif ($vtype eq "ve") { 3133 3129 print SCRIPT << "EOF"; 3134 # For VE we need a good null dev3135 pb_system("rm -f /dev/null; mknod /dev/null c 1 3; chmod 777 /dev/null");3136 3137 3130 # For VE we first need to mount some FS 3138 3131 pb_system("mount -t proc /proc /proc") unless (-d "/proc/$$"); 3139 3132 3133 # For VE we need a good null dev 3134 # Except for RedHat 6.2 where it's good and doesnt like being recreated 3140 3135 EOF 3136 print SCRIPT "pb_system('rm -f /dev/null; mknod /dev/null c 1 3; chmod 777 /dev/null')\n" unless (($pbos->{'name'} =~ /^redhat/) && ($pbos->{'version'} =~ /^6/)); 3141 3137 } else { 3142 3138 die "Unknown virtual type $vtype"; … … 3345 3341 print SCRIPT "pb_system(\"$ntpline\",\"Updating time with $ntpline\",\"mayfail\");\n"; 3346 3342 } 3347 # We may need a proxy configuration. Get it from the local env3348 my $ftp_proxy = pb_distro_get_param($pbos,pb_conf_get_if("ftp_proxy"));3349 my $http_proxy = pb_distro_get_param($pbos,pb_conf_get_if("http_proxy"));3350 3351 $ENV{'ftp_proxy'} ||= $ftp_proxy if ((defined $ftp_proxy) && ($ftp_proxy ne ""));3352 $ENV{'http_proxy'} ||= $http_proxy if ((defined $http_proxy) && ($http_proxy ne ""));3353 3354 if (defined $ENV{'http_proxy'}) {3355 print SCRIPT "\$ENV\{'http_proxy'\}=\"$ENV{'http_proxy'}\";\n";3356 }3357 3358 if (defined $ENV{'ftp_proxy'}) {3359 print SCRIPT "\$ENV\{'ftp_proxy'\}=\"$ENV{'ftp_proxy'}\";\n";3360 }3361 3343 3362 3344 print SCRIPT << 'EOF'; 3363 3345 3346 # We may need a proxy configuration. Get it from the local env 3347 pb_apply_conf_proxy($pbos); 3348 3364 3349 # Suse wants sudoers as 640 3365 3350 if ((($pbos->{'name'} eq "sles") && (($pbos->{'version'} =~ /10/) || ($pbos->{'version'} =~ /9/))) || (($pbos->{'name'} eq "opensuse") && ($pbos->{'version'} =~ /10.[012]/))) { … … 3415 3400 3416 3401 my $perldep = pb_distro_get_param($pbos,$osperldep); 3402 my $bashopt = ""; 3403 $bashopt = "-x" if ($pbdebug ge 1); 3404 my $verbopt = "mayfail"; 3405 $verbopt = "mayfailverbose" if ($pbdebug ge 1); 3417 3406 foreach my $m (split(/,/,$perldep)) { 3418 3407 # Skip empty deps … … 3420 3409 my $dir = $m; 3421 3410 $dir =~ s/-.*//; 3422 pb_system("echo \"rm -rf $m* ; wget http://search.cpan.org/CPAN/modules/by-module/$dir/$m-$osperlver->{$m}.tar.gz ; gzip -cd $m-$osperlver->{$m}.tar.gz | tar xf - ; cd $m* ; if [ -f Build.PL ]; then perl Build.PL; ./Build ; ./Build install ; else perl Makefile.PL; make ; make install ; fi; cd .. ; rm -rf $m*\" | bash -e " ,"Installing perl module $m-$osperlver->{$m}","mayfail");3411 pb_system("echo \"rm -rf $m* ; wget http://search.cpan.org/CPAN/modules/by-module/$dir/$m-$osperlver->{$m}.tar.gz ; gzip -cd $m-$osperlver->{$m}.tar.gz | tar xf - ; cd $m* ; if [ -f Build.PL ]; then perl Build.PL; ./Build ; ./Build install ; else perl Makefile.PL; make ; make install ; fi; cd .. ; rm -rf $m*\" | bash -e $bashopt" ,"Installing perl module $m-$osperlver->{$m}",$verbopt); 3423 3412 } 3424 3413 EOF
Note:
See TracChangeset
for help on using the changeset viewer.