From e8137c234e71dddea8a943eb033b3e9ddd3fd008 Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 23 Jul 2001 19:28:50 +0000 Subject: [PATCH] xloadt variability --- config | 8 ++++++-- files/_.configs_setenvir | 2 +- files/personal_scripts_bin_xloadt | 15 ++++++++++++++- gpt | 2 +- misc/Makefile | 2 +- perms | 1 + showresult | 1 + 7 files changed, 25 insertions(+), 6 deletions(-) diff --git a/config b/config index bed6412..4639ad5 100644 --- a/config +++ b/config @@ -1,6 +1,8 @@ @@- -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 ?"; + +$xbindir= '/usr/bin/X11'; chomp($s= `uname`); $? and die "platform $?"; if ($s =~ m/^Linux$/) { @@ -14,6 +16,7 @@ if ($s =~ m/^Linux$/) { chomp($_= `uname -r`); $? and die "platform $?"; m/^\d+\.\d+/ or die "$_ ?"; $platform= "SunOS$&"; + $xbindir= '/usr/openwin/bin'; } else { die "$s ?"; } @@ -21,3 +24,4 @@ if ($s =~ m/^Linux$/) { $ncipher= $hostname =~ m/\.ncipher\.com$/ ? 'cam' : $hostname =~ m/\.ncipherusa\.com$/ ? 'bos' : 0; + diff --git a/files/_.configs_setenvir b/files/_.configs_setenvir index 2580c22..17ade71 100755 --- a/files/_.configs_setenvir +++ b/files/_.configs_setenvir @@ -6,7 +6,7 @@ PATH=$HOME/personal/@@$platform@@/bin:$HOME/personal/scripts/bin PATH=$PATH:$HOME/personal/linux-i386/crypto/scripts @@;@@# PATH=$PATH:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/sbin:/usr/sbin -PATH=$PATH:/opt/bin:/usr/bin/X11 +PATH=$PATH:/opt/bin:@@$xbindir@@ export PATH diff --git a/files/personal_scripts_bin_xloadt b/files/personal_scripts_bin_xloadt index 861a76c..6ec1de7 100755 --- a/files/personal_scripts_bin_xloadt +++ b/files/personal_scripts_bin_xloadt @@ -3,4 +3,17 @@ hostname="`hostname | sed -e 's/\..*//'`" xlsclients | egrep \ '[^ ]* xload -geometry [^ ]* -title '"'xload - $hostname'" \ >/dev/null && exit 0 -xload -geometry 120x120+302+0 -title "xload - $hostname" +xload -geometry 120x120+@@ + +@hostlist= ($ncipher eq 'bos' ? qw(viking dover pell arrakis) : + $ncipher eq 'cam' ? qw(jura) : + qw(davenant anarres)); +for ($i=0; $i<@hostlist; $i++) { last if $hostlist[$i] eq $nodename; } +if ($i>=@hostlist) { + print STDERR "!! nodename $nodename not in $ncipher list @hostlist\n"; + $i=-2; +} + +302+141*$i; + +@@+0 -title "xload - $hostname" diff --git a/gpt b/gpt index 8524650..5076cc2 100755 --- a/gpt +++ b/gpt @@ -123,7 +123,7 @@ sub process_input () { if ($l =~ m/\@\@(.|\n)/) { ($to,$op,$esc,$l) = ($`,$1,$&,$'); add_text($to); - if ($op =~ m/[-< \$?]/) { + if ($op =~ m/[-< \$?\n]/) { $substr.= $esc if @oplist; push @oplist, $op; add_perl($op) if $op =~ m/[\$]/; diff --git a/misc/Makefile b/misc/Makefile index f24f08e..d9649c2 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -1,6 +1,6 @@ INSTALLDIR= $(HOME)/bin -TARGETS= with-lock-ex +TARGETS= with-lock-ex close3onwards CPPFLAGS= $(OPTIONS) CFLAGS= $(OPTIMISE) diff --git a/perms b/perms index 66f7fab..282385f 100644 --- a/perms +++ b/perms @@ -3,6 +3,7 @@ .configs/checkconfig +x .configs/chiarks +x .configs/configure +x +.configs/rxprofile +x .configs/startemacs +x .configs/x11start +x .configs/xbiffs +x diff --git a/showresult b/showresult index d630ba3..ed6e397 100644 --- a/showresult +++ b/showresult @@ -1,3 +1,4 @@ platform @@$platform@@ +nodename @@$nodename@@ hostname @@$hostname@@ ncipher @@$ncipher@@ -- 2.30.2