On Tue, May 29, 2001 at 03:35:11PM -0500, Phil Howard wrote:
> I get this error message during the CONFIGURE phase of installing from the
> color1.gz and color2.dsk pair:
>
> /usr/lib/setup/SeTkernel: 49: Syntax error: "fi" unexpected (expecting "then")
>
> The code looks like:
>
> =============================================================================
> for dir in /cdrom/kernels/*.?
> do
> if [ -d $dir ]
> then
> if [ "$ARCH" = "sparc64" -a ! "`echo $dir | grep sun4u`" = "" ]
> then
> echo "\"$dir\" \"\" \\" >> $TMP/tempscript
> elif [ "$ARCH" = "sparc" -a "`echo $dir | grep sun4u`" = "" ]
> echo "\"$dir\" \"\" \\" >> $TMP/tempscript
> fi
> fi
> done
> echo "2> $TMP/SeTreturn" >> $TMP/tempscript
> =============================================================================
>
> There needs to be a "then" after the elif, like:
>
> =============================================================================
> if [ "$ARCH" = "sparc64" -a ! "`echo $dir | grep sun4u`" = "" ]
> then
> echo "\"$dir\" \"\" \\" >> $TMP/tempscript
> elif [ "$ARCH" = "sparc" -a "`echo $dir | grep sun4u`" = "" ]
> then
> echo "\"$dir\" \"\" \\" >> $TMP/tempscript
> fi
> =============================================================================
>
> or just code things the way I do like:
>
> =============================================================================
> if [ "$ARCH" = "sparc64" -a ! "`echo $dir | grep sun4u`" = "" ]; then
> echo "\"$dir\" \"\" \\" >> $TMP/tempscript
> elif [ "$ARCH" = "sparc" -a "`echo $dir | grep sun4u`" = "" ]; then
> echo "\"$dir\" \"\" \\" >> $TMP/tempscript
> fi
> =============================================================================
Ha! Yeah, I can't count the number of times I've done that in shell
scripts. The then has been added back. New images will be uploaded as
soon as possible.
-- David Cantrell | david@slackware.com KG6CII | Slackware Linux Project
This archive was generated by hypermail 2b30 : Thu Sep 19 2002 - 11:00:03 PDT