chiark
/
gitweb
/
~ian
/
ian-dotfiles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c0f9b76
)
Understand if host canonical name has no dot.
author
ian
<ian>
Wed, 10 Jul 2002 10:38:31 +0000
(10:38 +0000)
committer
ian
<ian>
Wed, 10 Jul 2002 10:38:31 +0000
(10:38 +0000)
config
patch
|
blob
|
history
diff --git
a/config
b/config
index 83fa181bd91ec5264bfa1030b32293f24677f294..34a0e56eadad4ff816b483e211b78fe084495049 100644
(file)
--- a/
config
+++ b/
config
@@
-1,8
+1,11
@@
@@-
chomp($nodename= `uname -n`); $? and die 'uname $?';
@@-
chomp($nodename= `uname -n`); $? and die 'uname $?';
-($hostname)=(gethostbyname $nodename) or die "hostname $nodename ?";
-$nodename =~ s/\..*//;
+@he= gethostbyname $nodename or die "gethostbyname $nodename ?";
+@hostnames= ($he[0], split /\s/, $he[1]);
+($hostname)= grep /\./, @hostnames or die "no fqdn in @hostnames";
+
+$nodename =~ s/\..*//;
$xbindir= '/usr/bin/X11';
chomp($uname= `uname`); $? and die "platform $?";
$xbindir= '/usr/bin/X11';
chomp($uname= `uname`); $? and die "platform $?";