]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Avoid using hostname -f for portability to eg, OS X, use Net::Domain instead, and...
authorJoey Hess <joey@kodama.kitenet.net>
Fri, 22 Aug 2008 02:48:07 +0000 (22:48 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Fri, 22 Aug 2008 02:48:07 +0000 (22:48 -0400)
auto.setup
debian/changelog

index 3b8d923652591cb9fbccccb5835d2a9fd0961ec8..47d0d868f5de010af5c235827daf5ae376e9d68a 100644 (file)
@@ -18,7 +18,9 @@ our $rcs=IkiWiki::Setup::Automator::ask(
        "What revision control system to use?", "git");
 our $admin=IkiWiki::Setup::Automator::ask(
        "What wiki user (or openid) will be wiki admin?", $ENV{USER});
-our $hostname=`hostname -f`; chomp $hostname;
+use Net::Domain q{hostfqdn};
+our $domain=hostfqdn() || ikiwiki::setup::automator::ask(
+       "What is the domain name of the web server?", "");
 
 IkiWiki::Setup::Automator->import(
        wikiname => $wikiname,
@@ -28,10 +30,10 @@ IkiWiki::Setup::Automator->import(
        destdir => "$ENV{HOME}/public_html/$wikiname",
        repository => "$ENV{HOME}/$wikiname.$rcs",
        dumpsetup => "$ENV{HOME}/$wikiname.setup",
-       url => "http://$hostname/~$ENV{USER}/$wikiname",
-       cgiurl => "http://$hostname/~$ENV{USER}/$wikiname/ikiwiki.cgi",
+       url => "http://$domain/~$ENV{USER}/$wikiname",
+       cgiurl => "http://$domain/~$ENV{USER}/$wikiname/ikiwiki.cgi",
        cgi_wrapper => "$ENV{HOME}/public_html/$wikiname/ikiwiki.cgi",
-       adminemail => "$ENV{USER}\@$hostname",
+       adminemail => "$ENV{USER}\@$domain",
        add_plugins => [qw{goodstuff websetup}],
        disable_plugins => [qw{}],
        libdir => "$ENV{HOME}/.ikiwiki",
index e8dfdb7f6cf0edf69f9fdddb8eaa334e272b7578..813cf95237beb31bf7850ba889ea9c20779e4564 100644 (file)
@@ -2,6 +2,8 @@ ikiwiki (2.62) UNRELEASED; urgency=low
 
   * Avoid using cp -a (again). (HenrikBrixAndersen)
   * Add missing PREFIX to a few lines of the Makefile. (Thomas Keller)
+  * Avoid using hostname -f for portability to eg, OS X, use Net::Domain
+    instead, and prompt if it fails.
 
  -- Joey Hess <joeyh@debian.org>  Thu, 21 Aug 2008 16:20:58 -0400