The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Centos problem // Solution /scripts/fixndc

Discussion in 'General Discussion' started by LKHOST.COM, May 17, 2006.

  1. LKHOST.COM

    LKHOST.COM Registered

    Joined:
    May 17, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    PHP:
    It appears that CentOS support has been missed out in the latest DNSLib.pm
    (10.8.2-EDGE_89in both:

    /
    scripts/cPScript/DNSLib.pm
    /usr/local/cpanel/Cpanel/DNSLib.pm

    If you check in /scripts/cPScript/cPanelFunctions.pm within the getos()
    subroutine you'll see that it sets $os to "centos" for the CentOS operating
    system.

    However, in DNSLib.pm at line ~991 this if condition has not got "centos"
    listed:

        elsif ( $os eq '
    redhat' || $os eq 'fedora' || $os eq 'whitebox'
               || $os eq '
    mandrake' || $os eq 'caos' ) {

    This causes all the DNS functions to fail within WHM and /scripts that check
    for the OS version.

    I noticed this because I was seeing this error when attempting to perform DNS
    functions:

    Tue May  9 11:52:51 2006 warn [DNSLib]: Magic number checking on storable file
    failed at blib/lib/Storable.pm (autosplit into
    blib/lib/auto/Storable/_retrieve.al) line 331, at
    /usr/local/cpanel/Cpanel/DNSLib.pm line 111
    Tue May  9 11:52:51 2006 warn [DNSLib]:  at /usr/local/cpanel/Cpanel/DNSLib.pm
    line 115
            Cpanel::DNSLib::init('
    Cpanel::DNSLib=HASH(0x8fd3204)') called at
    /usr/local/cpanel/Cpanel/DNSLib.pm line 66
            Cpanel::DNSLib::new() called at /usr/local/cpanel/whostmgr/bin/dnsadmin
    line 119

    I was able to fix that issue by editing /etc/redhat-release and changing
    "CentOS" to "RedHat". /var/cpanel/CPDNSLib.dat was then created correctly
    (previously it was created empty) and the DNS functions now work.
    Fine
    Leonardo Andrade
    Lkhost.com
     
Loading...

Share This Page