svn commit: samba r17640 - in branches/SOC/bnh/perl: .
brad at samba.org
brad at samba.org
Mon Aug 21 00:16:14 GMT 2006
Author: brad
Date: 2006-08-21 00:16:13 +0000 (Mon, 21 Aug 2006)
New Revision: 17640
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17640
Log:
Update to the initial windows setup scripts to replace %SYSTEMROOT%\System32\Login.cmd.
This file contains the banner displayed when logging into windows via telnet, and the row's of ===='s in the default banner aren't appreciated by the build farm parsing scripts.
Added:
branches/SOC/bnh/perl/wintest_Login.cmd
Modified:
branches/SOC/bnh/perl/initial_setup.conf
branches/SOC/bnh/perl/vm_setup.pl
Changeset:
Modified: branches/SOC/bnh/perl/initial_setup.conf
===================================================================
--- branches/SOC/bnh/perl/initial_setup.conf 2006-08-20 23:30:54 UTC (rev 17639)
+++ branches/SOC/bnh/perl/initial_setup.conf 2006-08-21 00:16:13 UTC (rev 17640)
@@ -20,6 +20,12 @@
# Where these scripts will be copied from on the unix host.
export LOCAL_SCRIPT_PATH="./windows-scripts/"
+# The default Microsoft Telnet server's banner interfere's with the
+# way that Samba's build farm parses tests. This banner replaces the
+# row's of '==' with '++'. It is expected to be located within the
+# directory pointed to by $LOCAL_SCRIPT_PATH.
+export WINDOWS_BANNER_FILENAME="wintest_Login.cmd"
+
# In order to copy files and execute programs on the guest vm,
# we need administrator-level credentials to log in with.
export GUEST_ADMIN_USERNAME="administrator"
Modified: branches/SOC/bnh/perl/vm_setup.pl
===================================================================
--- branches/SOC/bnh/perl/vm_setup.pl 2006-08-20 23:30:54 UTC (rev 17639)
+++ branches/SOC/bnh/perl/vm_setup.pl 2006-08-21 00:16:13 UTC (rev 17640)
@@ -45,6 +45,8 @@
my $guest_script_path = $ENV{'GUEST_SCRIPT_PATH'};
my $local_script_path = $ENV{'LOCAL_SCRIPT_PATH'};
+my $banner_filename = $ENV{'WINDOWS_BANNER_FILENAME'};
+
my $vm = VMHost;
$vm->host_connect($host_server_name, $host_server_port, $host_username,
$host_password, $vm_cfg_path, $guest_admin_username,
@@ -82,6 +84,25 @@
$vm->run_on_guest($cmd, $cmd_args);
check_error($vm, "Error in \$vm->run_on_guest() while executing: " .
$cmd . $cmd_args . ".\n");
+
+# Part of the default banner for Microsoft's Telnet server gets parsed by the
+# build farm scripts. This one doesn't.
+my $login_cmd_path = "%SYSTEMROOT%\\System32\\";
+
+$cmd = "CMD.EXE ";
+$cmd_args = "/C COPY /Y " . $login_cmd_path . "Login.cmd " .
+ $login_cmd_path . "Login.cmd.smbtorture";
+$vm->run_on_guest($cmd, $cmd_args);
+check_error($vm, "Error in \$vm->run_on_guest() while executing: " .
+ $cmd . $cmd_args . ".\n");
+
+$cmd = "CMD.EXE ";
+$cmd_args = "/C COPY /Y " . $guest_script_path . "\\" . $banner_filename .
+ " " . $login_cmd_path . "Login.cmd";
+$vm->run_on_guest($cmd, $cmd_args);
+check_error($vm, "Error in \$vm->run_on_guest() while executing: " .
+ $cmd . $cmd_args . ".\n");
+
print "Windows setup scripts have been successfully executed on the VM.\n";
# Create a snapshot of the newly configured guest, to revert to if
Added: branches/SOC/bnh/perl/wintest_Login.cmd
===================================================================
--- branches/SOC/bnh/perl/wintest_Login.cmd 2006-08-20 23:30:54 UTC (rev 17639)
+++ branches/SOC/bnh/perl/wintest_Login.cmd 2006-08-21 00:16:13 UTC (rev 17640)
@@ -0,0 +1,14 @@
+rem
+rem Global login script for the Telnet Server,
+rem modified for the Samba build farm.
+rem
+rem In the default setup, this command script is executed when the
+rem initial command shell is invoked. It, in turn, will try to invoke
+rem the individual user's login script.
+rem
+
+echo *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+echo Welcome to Microsoft Telnet Server.
+echo *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+cd /d %HOMEDRIVE%\%HOMEPATH%
More information about the samba-cvs
mailing list