]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
* Add a check to afs-newcell to ensure the local hostname doesn't
authorRuss Allbery <rra@debian.org>
Sun, 17 Apr 2005 04:09:13 +0000 (04:09 +0000)
committerRuss Allbery <rra@debian.org>
Sun, 17 Apr 2005 04:09:13 +0000 (04:09 +0000)
    resolve to 127.0.0.1.  (Closes: #163751)

debian/afs-newcell
debian/changelog

index b896f000dc23180d3ea34176757ce6e836166c3e..d411dc5a598ffabe6fffe57fce2ed17b5d23ac4d 100644 (file)
@@ -7,6 +7,7 @@ use Term::ReadLine;
 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');
@@ -111,6 +112,15 @@ print "If the fileserver is not running, this may hang for 30 seconds.\n";
 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;
index 0040c07e7858ba5f4a99ea3c5d8a9ec3110b8939..b5f58c8ee52331cbf74a92e17868b3ea057aeceb 100644 (file)
@@ -5,6 +5,8 @@ openafs (1.3.81-4) UNRELEASED; urgency=low
   * 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)
 
  --