Changeset 349 in ProjectBuilder for devel/pb/bin
- Timestamp:
- Apr 3, 2008, 10:55:27 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r348 r349 918 918 919 919 # ssh communication if not VE 920 # should use a hash instead... 920 921 my ($shcmd,$cpcmd,$cptarget,$cp2target); 921 922 if ($cmt ne "ve") { … … 1249 1250 # Name of the account to deal with for VM/VE 1250 1251 # Do not use the one passed potentially with -a 1251 my $pbaccount= pb_conf_get($vtype."login");1252 my ($pbaccount) = pb_conf_get($vtype."login"); 1252 1253 1253 1254 if ($vtype eq "vm") { … … 1279 1280 EOF 1280 1281 print SCRIPT << "EOF"; 1281 \$found = 1 if (/^$pbaccount :/);1282 \$found = 1 if (/^$pbaccount->{$ENV{'PBPROJ'}}:/); 1282 1283 EOF 1283 1284 print SCRIPT << 'EOF'; … … 1291 1292 EOF 1292 1293 print SCRIPT << "EOF"; 1293 system "groupadd $pbaccount ";1294 system "useradd $pbaccount -g $pbaccount -m -d /home/$pbaccount";1294 system "groupadd $pbaccount->{$ENV{'PBPROJ'}}"; 1295 system "useradd $pbaccount->{$ENV{'PBPROJ'}} -g $pbaccount->{$ENV{'PBPROJ'}} -m -d /home/$pbaccount->{$ENV{'PBPROJ'}}"; 1295 1296 1296 1297 # For pb 1297 chdir "/home/$pbaccount ";1298 chdir "/home/$pbaccount->{$ENV{'PBPROJ'}}"; 1298 1299 mkdir ".ssh",0700; 1299 1300 # Allow those accessing root to access the build account 1300 1301 copy("\$ENV{'HOME'}/.ssh/authorized_keys",".ssh/authorized_keys"); 1301 1302 chmod 0600,".ssh/authorized_keys"; 1302 system 'chown -R $pbaccount :$pbaccount.ssh';1303 system 'chown -R $pbaccount->{$ENV{'PBPROJ'}}:$pbaccount->{$ENV{'PBPROJ'}} .ssh'; 1303 1304 1304 1305 EOF … … 1313 1314 EOF 1314 1315 print SCRIPT << "EOF"; 1315 s/^$pbaccount :\!\!:/$pbaccount:*:/;1316 s/^$pbaccount :\!:/$pbaccount:*:/; #SLES 9 e.g.1316 s/^$pbaccount->{$ENV{'PBPROJ'}}:\!\!:/$pbaccount->{$ENV{'PBPROJ'}}:*:/; 1317 s/^$pbaccount->{$ENV{'PBPROJ'}}:\!:/$pbaccount->{$ENV{'PBPROJ'}}:*:/; #SLES 9 e.g. 1317 1318 EOF 1318 1319 print SCRIPT << 'EOF'; … … 1333 1334 EOF 1334 1335 print SCRIPT << "EOF"; 1335 next if (/^$pbaccount /);1336 next if (/^$pbaccount->{$ENV{'PBPROJ'}} /); 1336 1337 EOF 1337 1338 print SCRIPT << 'EOF'; … … 1342 1343 EOF 1343 1344 print SCRIPT << "EOF"; 1344 # This is needed in order to be able to halt the machine from the $pbaccount account at least1345 print PBOUT "$pbaccount ALL=(ALL) NOPASSWD:ALL\n";1345 # This is needed in order to be able to halt the machine from the $pbaccount->{$ENV{'PBPROJ'}} account at least 1346 print PBOUT "$pbaccount->{$ENV{'PBPROJ'}} ALL=(ALL) NOPASSWD:ALL\n"; 1346 1347 EOF 1347 1348 print SCRIPT << 'EOF'; … … 1368 1369 EOF 1369 1370 1370 # Adds pb_distro_init from Project -Builder::Distribution1371 # Adds pb_distro_init from ProjectBuilder::Distribution 1371 1372 foreach my $d (@INC) { 1372 my $f = "$d/Project -Builder/Distribution.pm";1373 my $f = "$d/ProjectBuilder/Distribution.pm"; 1373 1374 if (-f "$f") { 1374 1375 open(PBD,"$f") || die "Unable to open $f";
Note:
See TracChangeset
for help on using the changeset viewer.