Avoid using hostname -f for portability to eg, OS X, use Net::Domain instead, and prompt if it fails.

master
Joey Hess 2008-08-21 22:48:07 -04:00
parent a98bfb05c0
commit 888f4203f5
2 changed files with 8 additions and 4 deletions

View 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",

2
debian/changelog vendored
View 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