2 chomp($nodename= `uname -n`); $? and die "uname $?";
3 chomp($username= `whoami`); $? and die "whoami $?";
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";
10 $xbindir= '/usr/bin/X11';
12 chomp($uname= `uname`); $? and die "platform $?";
13 if ($uname =~ m/^Linux$/) {
14 chomp($_= `uname -m`); $? and die "platform $?";
16 $platform= 'linux-i386';
20 } elsif ($uname =~ m/^SunOS$/) {
21 chomp($_= `uname -r`); $? and die "platform $?";
22 m/^\d+\.\d+/ or die "$_ ?";
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 "$_ ?";
34 } elsif ($uname =~ m/^AIX/) {
35 chomp($_= `uname -rv`); $? and die "platform $?";
36 m/^\d+ (\d+)$/ or die "$_ ?";
42 $ncipher= $hostname =~ m/\.(ncipher\.com$)/ ? 'cam' :
43 $hostname =~ m/\.(ncipherusa\.com$)/ ? 'bos' :
46 $chiark= $hostname =~ m/chiark/;
47 $laptop= $hostname =~ m/liberator|norway/;
49 %ncipherdom= ('cam' => 'ncipher.com',
50 'bos' => 'ncipherusa.com');