chiark / gitweb /
Correct handling of @@ stuff inside @@?; make NC_SITES vary.
[ian-dotfiles.git] / config
diff --git a/config b/config
index 6c6b6c69f1852436c88d33e58d2364c00c2d4d76..a3bc0b0074af37194c7775b36755b5bf85a22b3f 100644 (file)
--- a/config
+++ b/config
@@ -1,16 +1,28 @@
 @@-
-chomp($hostname= `uname -n`); $? and die 'uname $?';
-($hostname)=(gethostbyname $hostname) or die "hostname $hostname ?";
+chomp($nodename= `uname -n`); $? and die 'uname $?';
+($hostname)=(gethostbyname $nodename) or die "hostname $nodename ?";
+$nodename =~ s/\..*//;
 
-chomp($s= `uname`); $? and die 'platform $?';
+$xbindir= '/usr/bin/X11';
+
+chomp($s= `uname`); $? and die "platform $?";
 if ($s =~ m/^Linux$/) {
-    chomp($_= `uname -m`); $? and die 'platform $?';
+    chomp($_= `uname -m`); $? and die "platform $?";
     if (m/^i\d86/) {
        $platform= 'linux-i386';
     } else {
-       die '$_ ?';
+       die "$_ ?";
     }
+} elsif ($s =~ m/^SunOS$/) {
+    chomp($_= `uname -r`); $? and die "platform $?";
+    m/^\d+\.\d+/ or die "$_ ?";
+    $platform= "SunOS$&";
+    $xbindir= '/usr/openwin/bin';
+} else {
+    die "$s ?";
 }
 
-$ncipher= $hostname =~ m/\.ncipher\.com$/ 
-    || $hostname =~ m/\.ncipherusa\.com$/;
+$ncipher= $hostname =~ m/\.ncipher\.com$/ ? 'cam' :
+          $hostname =~ m/\.ncipherusa\.com$/ ? 'bos' :
+          0;
+