#!/bin/sh
#item   ####description                                      ###on off ###
TMP=/var/log/setup/tmp
if [ ! -d $TMP ]; then
  mkdir -p $TMP
fi
cat /dev/null > $TMP/SeTnewtag
dialog --title "SELECTING SOFTWARE FROM SERIES A (BASE LINUX SYSTEM)" \
       --checklist "Please select the optional components you wish to install \
from series A. Use the \
UP/DOWN keys to scroll through the list, and the SPACE key to select \
the items you wish to install. \
(NOTE: The more important system packages are not listed here and will be installed \
automatically) \
Press ENTER when you are \
done." 20 72 9 \
"ide"  "Linux 2.2.16 no SCSI (YOU NEED 1 KERNEL)" "on" \
"scsi"  "Linux 2.2.16 with SCSI (YOU NEED 1 KERNEL)" "on" \
"aoutlibs" "a.out (libc4) shared libraries" "on" \
"bash1" "GNU bash-1.14.7 shell" "on" \
"cpio" "The GNU cpio backup/archiving utility" "on" \
"floppy" "Utilities for using DOS floppies" "on" \
"getty" "Getty_ps 2.0.7j - OPTIONAL" "off" \
"gpm" "Cut and paste text with your mouse" "on" \
"ibcs2" "Runs SCO/SysVr4 binaries" "off" \
"isapnp" "Plug'n'Play configuration tool" "on" \
"kbd" "Change keyboard mappings and console fonts" "on" \
"loadlin" "Boots Linux (UMSDOS too!) from MS-DOS" "on" \
"lpr" "BSD lpr - printer spooling system" "on" \
"minicom" "Serial transfer and modem comm package" "on" \
"pcmcia" "PCMCIA card services support" "on" \
"infozip" "zip/unzip archive utilities" "on" \
"zoneinfo" "Configures your time zone" "on" \
2> $TMP/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
 rm -f $TMP/SeTpkgs
 > $TMP/SeTnewtag
 for pkg in aaa_base aoutlibs bash bin bzip2 cpio cxxlibs devs e2fsprog \
 elflibs bash1 \
 elvis etc fileutls find floppy fsmods getty glibcso gpm grep gzip hdsetup \
 ibcs2 ide isapnp kbd ldso less libc5 lilo loadlin lpr man minicom modules \
 modutils pciutils pcmcia procps scsi scsimods sh_utils shadow sysklogd \
 sysvinit tar tcsh txtutils umsprogs util infozip zoneinfo ; do
  echo "$pkg: SKP" >> $TMP/SeTnewtag
 done
 exit
fi
cat /dev/null > $TMP/SeTnewtag
for PACKAGE in aaa_base bash bin bzip2 cxxlibs devs e2fsprog elvis etc elflibs \
 fileutls find fsmods glibcso grep gzip hdsetup ldso less libc5 lilo man \
 modules modutils pciutils procps scsimods sh_utils shadow sysklogd \
 sndmods sysvinit tar tcsh txtutils umsprogs util ; do
  echo "$PACKAGE: ADD" >> $TMP/SeTnewtag
done
for PACKAGE in ide scsi lpr loadlin floppy ibcs2 pcmcia isapnp getty aoutlibs \
 minicom cpio kbd gpm infozip zoneinfo bash1 ; do
 if fgrep \"$PACKAGE\" $TMP/SeTpkgs 1> /dev/null 2> /dev/null ; then
  echo "$PACKAGE: ADD" >> $TMP/SeTnewtag
 else
  echo "$PACKAGE: SKP" >> $TMP/SeTnewtag
 fi
done
rm -f $TMP/SeTpkgs
