#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "network(Plamo Linux network system)シリーズの選択" \
  --checklist "network シリーズの中からインストールしたいパッケージを \
選んでください．カーソルの上下キーで \
対象を選択し，space キーでマーク(X)します． \
Enter キーでインストールを開始します．" 24 72 15 \
"bind" "名前解決(BIND)用パッケージ" "on" \
"bridge_utils" "イーサネットブリッジ設定ツール" "on" \
"curl" "ファイルアップロード/ダウンロードプログラム curl" "on" \
"cyrus_sasl" "Cyrus SASL library" "on" \
"dnsmasq" "dnsmasq (簡易 DNS/DHCP サーバ)" "on" \
"ethtool" "イーサネットカード設定ツール ethtool" "on" \
"fetchmail" "メール取り込みコマンド fetchmail" "on" \
"heimdal" "Kerberos5のフリーな実装 Heimdal" "on" \
"hostapd" "IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS 認証モジュール" "on" \
"iptables" "アクセス制御管理ツール iptables" "on" \
"iw" "Linux 無線デバイスの設定ツール" "on" \
"libidn" "国際ドメイン名用ライブラリ libidn" "on" \
"libiec61883" "IEC61883を実装したライブラリ libiec61883" "on" \
"libnl3" "Netlink用ライブラリv3" "on" \
"libpcap" "パケットキャプチャ用ライブラリ" "on" \
"libraw1394" "IEEE1394 raw device ライブラリ libraw1394" "on" \
"libssh" "SSHプロトコル用ライブラリ" "on" \
"libssh2" "SSH2 用ライブラリ libssh2" "on" \
"mailx" "BSD 版メーラ mailx" "on" \
"metamail" "メール用 MIME 変換コマンド集 metamail" "on" \
"ncftp" "高機能FTPクライアント ncftp" "on" \
"ntp" "時間同期コマンド ntp" "on" \
"ntrack" "ネットワーク上の状態追跡ライブラリNtrack" "on" \
"parprouted" "透過 IP(第 3 層)プロキシ ARP ブリッジツール" "on" \
"postfix" "メール配送プログラム postfix" "on" \
"ppp" "PPP接続ツール" "on" \
"pptpd" "PPTP 接続ツール" "on" \
"procmail" "メール振り分けプログラム procmail" "on" \
"rsync" "ファイル同期プログラム rsync" "on" \
"setserial" "シリアルポート設定ツール setserial" "on" \
"socat" "ソケットリレーツール" "on" \
"stunnel" "SSL 暗号化ラッパー" "on" \
"w3m" "テキストベースWebブラウザ w3m" "on" \
"wget" "ファイルダウンロードコマンド wget" "on" \
"wireless_tools" "無線LAN設定ツール wireless_tools" "on" \
"wpa_supplicant" "IEEE 802.11i 認証用ソフトウェア" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in bind bridge_utils curl cyrus_sasl dnsmasq ethtool fetchmail heimdal hostapd iptables iw libidn libiec61883 libnl3 libpcap libraw1394 libssh libssh2 mailx metamail ncftp ntp ntrack parprouted postfix ppp pptpd procmail rsync setserial socat stunnel w3m wget wireless_tools wpa_supplicant  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in bind bridge_utils curl cyrus_sasl dnsmasq ethtool fetchmail heimdal hostapd iptables iw libidn libiec61883 libnl3 libpcap libraw1394 libssh libssh2 mailx metamail ncftp ntp ntrack parprouted postfix ppp pptpd procmail rsync setserial socat stunnel w3m wget wireless_tools wpa_supplicant  ; 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
