#!/bin/sh
#item   ####description                                      ###on off ###
rm -f /tmp/SeTnewtag # empty the return file
dialog --title "SELECTING PACKAGES FOR SERIES N (NETWORK/NEWS/MAIL/UUCP)" \
       --checklist "Please select the packages you wish to install \
from series N. Use the \
UP/DOWN keys to scroll through the list, and the SPACE key to select \
the packages you wish to install. Recommended packages have \
already been selected for you, but you may unselect them if you wish. \
Press ENTER when you are \
done." 22 70 11 \
"netcfg" "A script to help configure TCP/IP" "on" \
"deliver" "Local mail delivery utility" "off" \
"dip" "Source code for dip v.3.3.7" "off" \
"ppp" "Point-to-point protocol" "off" \
"mailx" "The mailx mailer" "on" \
"tcpip" "TCP/IP networking programs" "on" \
"tracrout" "Source and binary of traceroute" "off" \
"uucp" "Taylor UUCP 1.04 (HoneyDanBer configuration)" "off" \
"elm" "Menu-driven user mail program" "off" \
"pine" "Pine menu-driven mail program" "off" \
"smail" "Ian Kluft's Linux port of Smail 3.1.28" "off" \
"cnews" "Spools and transmits Usenet news" "off" \
"nn" "The 'nn' news reader" "off" \
"tin" "The 'tin' news reader" "off" \
"trn" "A threaded news reader" "off" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
 rm -f /tmp/SeTpkgs
 exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in deliver dip ppp mailx tcpip tracrout uucp netcfg \
elm pine smail cnews nn tin trn ; 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
