chiark / gitweb /
belgrano
[ian-dotfiles.git] / config
1 @@-
2 chomp($nodename= `uname -n`); $? and die 'uname $?';
3
4 @he= gethostbyname $nodename or die "gethostbyname $nodename ?";
5 @hostnames= ($he[0], split /\s/, $he[1]);
6 ($hostname)= grep /\./, @hostnames or die "no fqdn in @hostnames";
7
8 $nodename =~ s/\..*//;
9 $xbindir= '/usr/bin/X11';
10
11 chomp($uname= `uname`); $? and die "platform $?";
12 if ($uname =~ m/^Linux$/) {
13     chomp($_= `uname -m`); $? and die "platform $?";
14     if (m/^i\d86/) {
15         $platform= 'linux-i386';
16     } else {
17         die "$_ ?";
18     }
19 } elsif ($uname =~ m/^SunOS$/) {
20     chomp($_= `uname -r`); $? and die "platform $?";
21     m/^\d+\.\d+/ or die "$_ ?";
22     $platform= "SunOS$&";
23     $xbindir= '/usr/openwin/bin';
24 } elsif ($uname =~ m/^HP\-UX/) {
25     chomp($_= `uname -r`); $? and die "platform $?";
26     m/^B\.(\d+\.\d+)$/ or die "$_ ?";
27     $platform= "HP-UX$1";
28 } else {
29     die "$uname ?";
30 }
31
32 $ncipher= $hostname =~ m/\.(ncipher\.com$)/    ? 'cam' :
33           $hostname =~ m/\.(ncipherusa\.com$)/ ? 'bos' :
34           0;
35
36 %ncipherdom= ('cam' => 'ncipher.com',
37               'bos' => 'ncipherusa.com');