Menu

Problems with hostname change

Help
ComBas
2016-04-04
2016-04-08
  • ComBas

    ComBas - 2016-04-04

    Hello,

    I'm trying to set up a new series of Internet workstations for my office, by using DRBL-Winroll in the latest stable version (1.7.0-228). The configuration files are the following (comments are stripped for brevity):

    File winroll.conf:

    drbl-winroll.VERSION = 1.7.0
    cygwin.dll.VERSION = 2.1.0
    wsname.VERSION = 2.88b
    monitor.VERSION = Munin Node 1.6.1-beta
    rc.VERSION = 228
    
    HN_WSNAME_DEF_PARAM = /N:$MAC
    NETWORK_MODE_DEF_PARAM = dhcp
    IF_NEWSID_DEF_PARAM = 0
    
    SKIP_SERVICE_AS_TEMPLETE="autonewsid add2ad"
    
    HN_WSNAME_PARAM = /RDF:C:\cygwin\drbl_winroll-config\hosts.conf /DFK:$MAC
    WG_WSNAME_PARAM = 
    IF_AUTOHOSTNAME_SERVICE = y
    CONFIG_NETWORK_MODE = /RDF:C:\cygwin\drbl_winroll-config\client-mac-network.conf 
    

    File client-mac-network.conf:

    _DEFAULT_NETWORK    = 192.168.209.254/24
    _DEFAULT_GATEWAY    = none
    _DEFAULT_DNS        = 8.8.8.8, 8.8.4.4  # use comma symbol (,) as separator
    _DEFAULT_WINS       = 
    _DEFAULT_DNS_SUFFIX = 
    
    [IP Address]
    D8-CB-8A-BC-FA-45 = 192.168.209.51
    #00-0D-9D-9F-0E-6E = 192.168.209.52
    #08-00-27-CB-FF-2E = 192.168.209.53
    

    File hosts.conf:

    D8-CB-8A-BC-FA-45 = IGC-Internet1
    #XX-XX-XX-XX-XX-XX = IGC-Internet2
    #XX-XX-XX-XX-XX-XX = IGC-Internet3
    

    With this configuration the IP address is correctly set, but the hostname is not (it seems the hostname change procedure is skipped).
    If I change the first line in hosts.conf with D8CB8ABCFA45 = IGC-Internet1 (without dashes in MAC), or with 192.168.209.51 = IGC-Internet1 (using the IP address), the hostname is changed, but not in the way I expected: it becomes the MAC address in string (D8CB8ABCFA45 in this case).

    How can I get the hostname correctly set, it should be IGC-Internet1 in this machine?

    Thanks in advance for answering...

     

    Last edit: ComBas 2016-04-04
  • Ceasar Sun

    Ceasar Sun - 2016-04-06

    As the http://www.drbl-winroll.org/#config-hostname , use
    D8CB8ABCFA45 = IGC-Internet1
    without dashes in MAC is correct.
    But dashes is required in "client-mac-network.conf" , excuse for these confuses.
    We will make it the same in next lease.

     
  • ComBas

    ComBas - 2016-04-06

    Ehm... ok. But I got no answer about this point:

    If I change the first line in hosts.conf with D8CB8ABCFA45 = IGC-Internet1 (without dashes in MAC), or with 192.168.209.51 = IGC-Internet1 (using the IP address), the hostname is changed, but not in the way I expected: it becomes the MAC address in string (D8CB8ABCFA45 in this case).

     
  • ComBas

    ComBas - 2016-04-07

    I tried the "patch way"... but with no good results.

    I couldn't find the file winrollsrv.sh under C:\Cygwin\sbin. I found it in C:\Cygwin\bin and I replaced this one with the file you linked above.

    Anyway, I still have an unexpected result: the hostname is now changed with the machine MAC address, preceded by the letter "S" (example: SD8CB8ABCFA45)

     
  • Ceasar Sun

    Ceasar Sun - 2016-04-07

    oh... , forget to say:
    In hosts.conf , use dashes in MAC of IP address, ex:
    00-0C-29-4E-EF-53 = IGC-Internet1
    or
    192-168-209-51 = IGC-Internet1

    NOT '000C294EEF53 = IGC-Internet1' , excuse me.

    I also fix the document just before. please refer to :
    http://drbl-winroll.org/#config-hostname

     
  • ComBas

    ComBas - 2016-04-07

    Ok... hostname change by MAC address seems to work correctly now (thank you!).

    But you should fix this function when the IP address is specified: both "dashed" and "dotted" styles actually change the hostname in "S-MAC Address" as above.

     
  • Ceasar Sun

    Ceasar Sun - 2016-04-08

    Ha, in fact , the hostname's parameter is inherited from wsname.exe , like $IP , $MAC .
    Thanks for your suggestions and we will implement these features as soon as possible.

     

Log in to post a comment.