Changeset 152 in ProjectBuilder for devel/pb/bin


Ignore:
Timestamp:
Sep 27, 2007, 11:45:12 PM (17 years ago)
Author:
Bruno Cornec
Message:

Adds the possibility to connect to the VM using a given account (useful for root access)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r150 r152  
    4242my $pbdatecvs = strftime("%Y-%m-%d %H:%M:%S", @date);
    4343my $debug = 0;
     44my $pbaccount;              # Login to use to connect to the VM
    4445my $LOG = \*STDOUT;
    4546
    46 getopts('hl:m:p:qr:s:tv',\%opts);
     47getopts('a:hl:m:p:qr:s:tv',\%opts);
    4748
    4849my ($projectbuilderver,$projectbuilderrev) = pb_version_init();
     
    7980if (defined $opts{'s'}) {
    8081    $pbscript = $opts{'s'};
     82}
     83if (defined $opts{'a'}) {
     84    $pbaccount = $opts{'a'};
    8185}
    8286
     
    480484    my ($sshhost,$sshlogin,$sshdir,$sshport) = pb_conf_get($host,$login,$dir,$port);
    481485    my $mac = "$sshlogin->{$ENV{'PBPROJ'}}\@$sshhost->{$ENV{'PBPROJ'}}";
     486    # Overwrite account value if passed as parameter
     487    $mac = "$pbaccount\@$sshhost->{$ENV{'PBPROJ'}}" if (defined $pbaccount);
    482488    my $tdir;
    483489    my $bdir;
     
    732738    print "pb (aka project-builder) Version $projectbuilderver-$projectbuilderrev\n";
    733739    print "\n";
    734     print "Syntax: pb [-vhqt][-r pbroot][-p project][[-s script] -m \"mach-1[,...]\"] <action> [<pkg1>...]\n";
     740    print "Syntax: pb [-vhqt][-r pbroot][-p project][[-s script -a account] -m \"mach-1[,...]\"] <action> [<pkg1>...]\n";
    735741    print "\n";
    736742    print "-h : This help file\n";
     
    746752    print "             to execute on the related VMs.\n";
    747753    print "\n";
     754    print "-a account : Name of the account to use\n";
     755    print "             to connect on the related VMs.\n";
     756    print "\n";
    748757    print "-p project : Name of the project you're working on\n";
    749758    print "             (or use the env variable PBPROJ)     \n";
Note: See TracChangeset for help on using the changeset viewer.