diff --git a/xCAT-test/autotest/testcase/installation/customize_sleep_for_sn b/xCAT-test/autotest/testcase/installation/customize_sleep_for_sn index 406252acf..2101cfa9f 100755 --- a/xCAT-test/autotest/testcase/installation/customize_sleep_for_sn +++ b/xCAT-test/autotest/testcase/installation/customize_sleep_for_sn @@ -12,11 +12,11 @@ sleep 300; my $timecnt=0; while($timecnt < 200){ - my $booted=system("lsdef -l $snnodename|grep status|grep booted"); + my $booted=system("lsdef -l $snnodename|grep status|grep booted > /dev/null 2>&1"); last if($booted==0); if($os =~ /rhel/i && $arch =~ /^ppc64$/i){ - my $booting=system("lsdef -l $snnodename|grep status|grep booting"); + my $booting=system("lsdef -l $snnodename|grep status|grep booting > /dev/null 2>&1"); system("xdsh $snnodename \"echo 1\"") if($booting==0); `echo "send signal to $snnodename for the $timecnt times" >> $log`; } diff --git a/xCAT-test/autotest/testcase/installation/pre_deploy_sn b/xCAT-test/autotest/testcase/installation/pre_deploy_sn index b58c44474..d02f342a8 100755 --- a/xCAT-test/autotest/testcase/installation/pre_deploy_sn +++ b/xCAT-test/autotest/testcase/installation/pre_deploy_sn @@ -1,5 +1,7 @@ #!/usr/bin/env perl +$ENV{TERM} = "xterm-256color"; + my $os=$ARGV[0]; my $arch=$ARGV[1]; my $log="/tmp/pre_deploy_sn.log"; @@ -13,20 +15,7 @@ sub runcmd{ } } -my $setupmysqlscript="#!/usr/bin/expect -f -set timeout -1 -spawn mysqlsetup -i -expect \"in the MySQL database:\" -send \"12345\\r\" -expect \"in the MySQL database:\" -send \"12345\\r\" -interact -"; - -my $cmd = "echo '$setupmysqlscript' > /tmp/setupmysqlscript && chmod +x /tmp/setupmysqlscript"; -runcmd("$cmd"); - -$cmd="bash -lic \"/tmp/setupmysqlscript > /tmp/setupmysqlscript.rst\" "; +$cmd="XCATMYSQLADMIN_PW=12345 XCATMYSQLROOT_PW=12345 /opt/xcat/bin/mysqlsetup -i -V"; runcmd("$cmd"); $cmd="echo \"GRANT ALL on xcatdb.* TO xcatadmin@\'%\' IDENTIFIED BY \'12345\'\;\" | mysql -u root -p12345";