use strict;
use Debian::OpenAFS::ConfigUtils;
use Getopt::Long;
+use Socket qw(inet_ntoa);
use vars qw($admin $server
$requirements_met $shutdown_needed);
my $rl = new Term::ReadLine('afs-newcell');
run("/etc/init.d/openafs-fileserver stop");
$server = `hostname`;
chomp $server;
+my $ip = gethostbyname $server;
+if (inet_ntoa ($ip) eq '127.0.0.1') {
+ print "Your hostname $server resolves to 127.0.0.1, which AFS cannot\n";
+ print "cope with. Make sure your hostname resolves to a non-loopback\n";
+ print "IP address. (Check /etc/hosts and make sure that your hostname\n";
+ print "isn't listed on the 127.0.0.1 line. If it is, removing it from\n";
+ print "that line will probably solve this problem.)\n";
+ exit(1);
+}
$admin = $rl->readline("What administrative principal should be used? ") unless $admin;
die "Please specify an administrative user\n" unless $admin;
$admin =~ s:/:.:g;
* Put the compiled modules into KPKG_DEST_DIR if set. This appears to
be preferred over DEB_DEST by the make-kpkg documentation. Thanks,
Jonas Smedegaard. (Closes: #206403)
+ * Add a check to afs-newcell to ensure the local hostname doesn't
+ resolve to 127.0.0.1. (Closes: #163751)
--