Re: Elks Distribution

Riley Williams
2002-05-26T15:27:33Z

Hi Neil.

Update to the following...

>> I will, indeed, look very closely at your remarks as I move forward.
>> I am particularly interested by the partition.c.

> If you're using ash as your install shell, you should be able to use the
> following script...
>
> #!/bin/ash
>
> :
>
> fdisk /dev/bda
> TGT=$(partype 80)

if test -n "${TGT}" ; then
# Use ${TGT} as partition.
else
# No partition of type 80 found, so error.
fi

> ...and, from this point, you just use ${TGT} as the target partition.
> I can't test this at the moment as I'm not near a suitable system, so
> the above is pure theory at this point. However, memory says that sash
> does not support the necessary facilities.
>
> Also note that if we move to /dev/hda instead of /dev/bda then only the
> fdisk line needs changing, and the rest of the code will work as is.

As shown by the additional code above, a test immediately following the
partype line determines whether installation is possible as indicated
above. Alternatively, code similar to the following could be used...

export TGT=''
while test -z "${TGT}" ; do
fdisk /dev/bda
TGT=$(partype 80)
if test -z "${TGT}" ; then
echo Need at least one partition of type 80.
sleep 5
fi
done

...as this guarantees that a suitable partition will exist once the
while loop finishes.

Best wishes from Riley.