It's all about the answers!

Ask a question

SCM login method fails


Israel Lazar (4599) | asked Sep 29 '14, 8:03 a.m.
edited Sep 29 '14, 8:18 a.m. by Krzysztof Kaźmierczyk (7.4k374103)
I am trying to write script that create RTC environment

1. Log in to CCM with verbale (username & Password)using  
     lscm login -c -r %rtc_server% -n local -u %username% -P %Password% but he did not take it , 
     when i put it inside the script its work ok

2. I tried to do in perl also did not work why?
# error message 
# (1) quit unless we have the correct number of command-line args 
$num_args = @ARGV;
print "$num_args\n";
if ($num_args != 2) { 
    print "\nUsage:  RTC_env.pl UserName Password\n"; 
    exit; 
}
$username = $ARGV[0];
$password = $ARGV[1];
system("lscm login -r https://ilazar-PC:9443/ccm -n local -u $username -P $password");
print "lscm login -r https://ilazar-PC:9443/ccm -n local -u $username -P $password\n";


One answer



permanent link
Donald Nong (14.5k414) | answered Sep 29 '14, 9:33 p.m.
I am not sure why you would use Perl to call the SCM command line. If the code you posted is all that in the Perl script, a required line is missing at the beginning of the file.
#! /usr/bin/perl
Another potential problem is that you do not specify the complete path to the "lscm" script and your Perl script may not be able to invoke the "lscm" script at all.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.