chiark / gitweb /
xloadt variability
[ian-dotfiles.git] / config
1 @@-
2 chomp($nodename= `uname -n`); $? and die 'uname $?';
3 ($hostname)=(gethostbyname $nodename) or die "hostname $nodename ?";
4
5 $xbindir= '/usr/bin/X11';
6
7 chomp($s= `uname`); $? and die "platform $?";
8 if ($s =~ m/^Linux$/) {
9     chomp($_= `uname -m`); $? and die "platform $?";
10     if (m/^i\d86/) {
11         $platform= 'linux-i386';
12     } else {
13         die "$_ ?";
14     }
15 } elsif ($s =~ m/^SunOS$/) {
16     chomp($_= `uname -r`); $? and die "platform $?";
17     m/^\d+\.\d+/ or die "$_ ?";
18     $platform= "SunOS$&";
19     $xbindir= '/usr/openwin/bin';
20 } else {
21     die "$s ?";
22 }
23
24 $ncipher= $hostname =~ m/\.ncipher\.com$/ ? 'cam' :
25           $hostname =~ m/\.ncipherusa\.com$/ ? 'bos' :
26           0;
27