Changeset 1649 in ProjectBuilder for devel/pb/bin/pb
- Timestamp:
- Sep 27, 2012, 2:29:27 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r1632 r1649 24 24 use File::Copy; 25 25 use File::stat; 26 use File::Temp qw(tempdir);27 26 use File::Find; 28 27 use Time::localtime qw(localtime); … … 2270 2269 # should use a hash instead... 2271 2270 my ($shcmd,$shcmdroot,$cpcmd,$cptarget,$cp2target); 2271 my $tpdir; 2272 2272 if ($cmt =~ /^VE/) { 2273 2273 my $tp = pb_path_expand($vepath->{$ENV{'PBPROJ'}}); 2274 my$tpdir = pb_path_expand("$tp/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}");2274 $tpdir = pb_path_expand("$tp/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}"); 2275 2275 my ($ptr) = pb_conf_get("vetype"); 2276 2276 my $vetype = $ptr->{$ENV{'PBPROJ'}}; … … 2342 2342 # For VE we need to change the owner manually 2343 2343 if ($cmt =~ /^VE/) { 2344 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"); 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")); 2345 2346 pb_system("$shcmd \"sudo $chowncommand -R $mac $tdir\"","Adapt owner in $tdir to $mac"); 2346 2347 } … … 2521 2522 # Keep only the first VM in case many were given 2522 2523 if ($v =~ /,/) { 2523 pb_log(0,"WARNING: pruning to just the first of several vms listed ($v)\n");2524 pb_log(0,"WARNING: pruning to just the first of several VM/VE/RMs listed ($v)\n"); 2524 2525 $v =~ s/,.*//; 2525 2526 } … … 3081 3082 3082 3083 # Define mandatory global vars 3083 our $pbdebug; 3084 our $pbLOG; 3085 our $pbsynmsg = "pbscript"; 3086 our $pbdisplaytype = "text"; 3087 our $pblocale = ""; 3084 EOF 3085 my $ppref = "our"; 3086 $ppref = "my" if (($pbos->{'name'} =~ /redhat/) && ($pbos->{'version'} =~ /^6/)); 3087 print SCRIPT << "EOF"; 3088 $ppref \$pbdebug; 3089 $ppref \$pbLOG; 3090 $ppref \$pbsynmsg = "pbscript"; 3091 $ppref \$pbdisplaytype = "text"; 3092 $ppref \$pblocale = ""; 3093 EOF 3094 print SCRIPT << 'EOF'; 3088 3095 pb_log_init($pbdebug, $pbLOG); 3089 3096 EOF
Note:
See TracChangeset
for help on using the changeset viewer.