[Koha-devel] rewrite-config.PL

Thomas Krichel krichel at openlib.org
Thu Jan 14 12:23:16 CET 2010



  Hi,

  I had problems with rewrite-config.PL with a commercial hosting
  company where the hostname() gave a wrong answer. I suggest to
  replace to call to hostname() in rewrite-config.PL with calls to
  system utilities that a user could use to verify the state of the
  system. From the code of 3.00.04_fixed, I suggest a new
  rewrite-config.PL as

diff rewrite-config_org.PL rewrite-config.PL
63,65c63,73
< $myhost = hostname();
< $mydomain = $myhost;
< $mydomain =~ s/^.*?\.//;
---
> # set host and domain using dns utility calls
> my $myhost = `hostname`;
> chomp $myhost;
> my $mydomain= `dnsdomainname`;
> chomp $mydomain;
> # use earlier method if this fails
> if(not $myhost or not $mydomain) {
>     $myhost = hostname();
>     $mydomain = $myhost;
>     $mydomain =~ s/^.*?\.//;
> }


  Cheers,

  Thomas Krichel                    http://openlib.org/home/krichel
                                http://authorclaim.org/profile/pkr1
                                               skype: thomaskrichel



More information about the Koha-devel mailing list