#!/bin/sh
#item   ####description                                      ###on off ###
cat /dev/null > /tmp/SeTnewtag 
dialog --title "n(network) series" \
       --checklist "select packages from n series" 20 72 14 \
"bind9" "bind-9.2.1" "off" \
"iptables" "iptables 1.2.7a" "on" \
"mailx" "BSD mailx 5.5." "on" \
"metamail" "metamail-2.7" "on" \
"mh" "MH" "on" \
"mnews" "mnews 1.21" "on" \
"ppp" "PPP for Linux" "on" \
"procmail" "procmail " "on" \
"rsync" "rsync 2.5.5" "on" \
"postfix" "MTA postfix" "on" \
"tcpip" "TCP/IP network program" "on" \
"ncftp" "FTP client ncftp" "on" \
"wget" "FTP/HTTP client wget" "on" \
"proftpd" "proftpd FTP daemon" "on" \
"dhcpcd" "DHCP client daemon" "on" \
"openssl" "OpenSSL" "on" \
"openssh" "OpenSSH" "on" \
"w3m" "W3M(Web wo Miru) simple web browser" "on" \
"qpopper" "Qpopper" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then 
 rm -f /tmp/SeTpkgs 
 > /tmp/SeTnewtag 
for pkg in bind9 iptables mailx metamail mh mnews ppp procmail rsync postfix tcpip dhcpcd openssl openssh w3m qpopper proftpd ncftp wget ; do
  echo "$pkg: SKP" >> /tmp/SeTnewtag 
 done 
 exit 
fi 
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in bind9 iptables mailx metamail mh mnews ppp procmail rsync postfix tcpip dhcpcd openssl openssh w3m qpopper proftpd ncftp wget ; do
  if grep \"$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
