From 38b7de8d4362fcb8e7cf91d6618e4f09fb92aa44 Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 23 Jul 2001 18:52:02 +0000 Subject: [PATCH] Bomb if platform not recognised. Do not test $! after pclose. SunOS platform. --- config | 12 +++++++++--- process | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/config b/config index d9d49e6..bed6412 100644 --- a/config +++ b/config @@ -2,14 +2,20 @@ chomp($hostname= `uname -n`); $? and die 'uname $?'; ($hostname)=(gethostbyname $hostname) or die "hostname $hostname ?"; -chomp($s= `uname`); $? and die 'platform $?'; +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$&"; +} else { + die "$s ?"; } $ncipher= $hostname =~ m/\.ncipher\.com$/ ? 'cam' : diff --git a/process b/process index 0787d79..192d964 100755 --- a/process +++ b/process @@ -32,7 +32,7 @@ sub read_prep ($) { if (!$c) { exec './gpt','config',$inputfile; die $!; } } sub fin_prep () { - $!=0; close P; die "$! $?" if $! or $?; + close P; die "$?" if $?; } read_prep('perms'); -- 2.30.2