You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vcl.apache.org by "Andy Kurth (JIRA)" <ji...@apache.org> on 2015/07/14 19:34:05 UTC

[jira] [Created] (VCL-884) Windows.pm fails to set computer hostname

Andy Kurth created VCL-884:
------------------------------

             Summary: Windows.pm fails to set computer hostname
                 Key: VCL-884
                 URL: https://issues.apache.org/jira/browse/VCL-884
             Project: VCL
          Issue Type: Bug
          Components: vcld (backend)
    Affects Versions: 2.4.2
            Reporter: Andy Kurth
            Assignee: Andy Kurth
            Priority: Minor
             Fix For: 2.4.3


The {{Windows.pm::set_computer_hostname}} subroutine does not work properly because the command it assembles contains single quotes.  The following warning is generated in _vcld.log_:
{noformat}
---- WARNING ----
2015-07-14 13:28:57|Windows.pm:set_computer_hostname|12392|failed to set computer name of <vcl db name> to <resolved hostname>, exit status: 218, command:
echo | cmd.exe /c "C:/Windows/Sysnative/Wbem/wmic.exe COMPUTERSYSTEM WHERE Name='%COMPUTERNAME%' Rename '<resolved hostname>'"
output:
Invalid Verb Switch.
( 0) Windows.pm, set_computer_hostname (line: 12392)
(-1) test.pm, process (line: 89)
(-2) vcld, make_new_child (line: 600)
(-3) vcld, main (line: 357)
{noformat}

The single quotes around _%COMPUTERNAME%_ and the intended hostname need to be changed to double quotes and properly escaped.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)