chiark / gitweb /
Tail the hspa log
[ian-dotfiles.git] / from-cvs / config
1 @@-
2 chomp($nodename= `uname -n`); $? and die "uname $?";
3 chomp($username= `whoami`); $? and die "whoami $?";
4
5 @he= gethostbyname $nodename or die "gethostbyname $nodename ?";
6 @hostnames= ($he[0], split /\s/, $he[1]);
7 ($hostname)= grep /\./, @hostnames or die "no fqdn in @hostnames";
8
9 $nodename =~ s/\..*//;
10 $xbindir= '/usr/bin/X11';
11
12 chomp($uname= `uname`); $? and die "platform $?";
13 if ($uname =~ m/^Linux$/) {
14     chomp($_= `uname -m`); $? and die "platform $?";
15     if (m/^i\d86/) {
16         $platform= 'linux-i386';
17     } else {
18         die "$_ ?";
19     }
20 } elsif ($uname =~ m/^SunOS$/) {
21     chomp($_= `uname -r`); $? and die "platform $?";
22     m/^\d+\.\d+/ or die "$_ ?";
23     $platform= "SunOS$&";
24     $xbindir= '/usr/openwin/bin';
25 } elsif ($uname =~ m/^FreeBSD/) {
26     chomp($_= `uname -r`); $? and die "platform $?";
27     m/^(\d+\.\d+)\-/ or die "$_ ?";
28     $platform= "FreeBSD-$1";
29     $xbindir= '/usr/X11R6/bin';
30 } elsif ($uname =~ m/^HP\-UX/) {
31     chomp($_= `uname -r`); $? and die "platform $?";
32     m/^B\.(\d+\.\d+)$/ or die "$_ ?";
33     $platform= "HP-UX$1";
34 } elsif ($uname =~ m/^AIX/) {
35     chomp($_= `uname -rv`); $? and die "platform $?";
36     m/^\d+ (\d+)$/ or die "$_ ?";
37     $platform= "AIX$1";
38 } else {
39     die "$uname ?";
40 }
41
42 $ncipher= $hostname =~ m/\.(ncipher\.com$)/    ? 'cam' :
43           $hostname =~ m/\.(ncipherusa\.com$)/ ? 'bos' :
44           0;
45
46 $chiark=  $hostname =~ m/chiark/;
47 $laptop=  $hostname =~ m/liberator|norway/;
48
49 %ncipherdom= ('cam' => 'ncipher.com',
50               'bos' => 'ncipherusa.com');