Changeset 226 for devel/pb/bin/pb


Ignore:
Timestamp:
Oct 17, 2007, 6:38:20 PM (12 years ago)
Author:
bruno
Message:
  • Improve pbsetupqemu for fc4, sudoers management
  • Adds updateqemu script
  • Adds support for "flat" type of CMS
  • gentoo is nover now
  • halt replaces poweroff
  • try to fix date issue on the VM
  • improve destdir management on spec file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r220 r226  
    567567        pb_system("ssh -q -p $port $mac \"rm -rf $tdir $bdir\"","VM cleanup on $mac");
    568568        if (! $vmexist) {
    569             pb_system("ssh -q -p $port $mac \"sudo /usr/bin/poweroff \"; sleep $tm ; echo \'if [ -d /proc/$vmpid ]; then kill -9 $vmpid; fi \' | bash ; sleep 10","VM $vm halt (pid $vmpid)");
     569            pb_system("ssh -q -p $port $mac \"sudo /sbin/halt -p \"; sleep $tm ; echo \'if [ -d /proc/$vmpid ]; then kill -9 $vmpid; fi \' | bash ; sleep 10","VM $vm halt (pid $vmpid)");
    570570        }
    571571        pb_send2ssh("Packages","$odir"."_"."$over");
     
    636636        $vmm = "$vmpath->{$ENV{'PBPROJ'}}/$vm.qemu";
    637637        if (! -f "$vmm") {
    638             print "Unable to find VM $vmm";
    639             return;
     638            die "Unable to find VM $vmm";
    640639        }
    641640        $cmd = "$vmcmd $ENV{'PBVMOPT'} -redir tcp:$vmport->{$ENV{'PBPROJ'}}:10.0.2.15:22 $vmm"
     
    674673    print SCRIPT "mv .pbrc \$HOME\n";
    675674    print SCRIPT "cd ..\n";
     675    # Force new date to be in the future compared to the date of the tar file by removing 1 minute
     676    my @date=(localtime->sec(), localtime->min(), localtime->hour(), localtime->mday(), localtime->mon(), localtime->year(), localtime->wday(), localtime->yday(), localtime->isdst());
     677    $date[1]--;
    676678    my $upddate = strftime("%m%d%H%M%Y", @date);
    677679    print SCRIPT "echo Setting up date on $vmntp...\n";
Note: See TracChangeset for help on using the changeset viewer.