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 } elsif ($uname =~ m/^HP\-UX/) {
30 chomp($_= `uname -r`); $? and die "platform $?";
31 m/^B\.(\d+\.\d+)$/ or die "$_ ?";
37 $ncipher= $hostname =~ m/\.(ncipher\.com$)/ ? 'cam' :
38 $hostname =~ m/\.(ncipherusa\.com$)/ ? 'bos' :
41 %ncipherdom= ('cam' => 'ncipher.com',
42 'bos' => 'ncipherusa.com');