SCM login method fails
I am trying to write script that create RTC environment
1. Log in to CCM with verbale (username & Password)using
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
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/perlAnother 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.