#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "network(Plamo Linux network system)シリーズの選択" \
  --checklist "network シリーズの中からインストールしたいパッケージを \
選んでください．カーソルの上下キーで \
対象を選択し，space キーでマーク(X)します． \
Enter キーでインストールを開始します．" 24 72 15 \
"bind" "名前解決(BIND)用パッケージ" "off" \
"bridge-utils" "イーサネットブリッジ設定ツール" "on" \
"curl" "ファイルアップロード/ダウンロードプログラム" "on" \
"cyrus_sasl" "Cyrus SASL library" "off" \
"ethtool" "イーサネットカード設定ツール" "on" \
"fetchmail" "メール取り込みコマンド" "on" \
"iptables" "アクセス制御管理ツール" "off" \
"libidn" "国際ドメイン名用ライブラリ libidn" "on" \
"libiec61883" "IEC61883 の実装系" "off" \
"libraw1394" "IEEE1394 raw device ライブラリ" "off" \
"libssh2" "SSH2 ライブラリ" "on" \
"mailx" "BSD 版メーラ" "on" \
"metamail" "MIME変換コマンド集" "on" \
"ncftp" "高機能FTPクライアント" "on" \
"ntp" "時間同期コマンド" "on" \
"postfix" "メール配送プログラム" "off" \
"ppp" "PPP接続ツール" "on" \
"procmail" "メール振り分けプログラム" "on" \
"rsync" "ファイル配布プログラム" "on" \
"setserial" "シリアルポート設定ツール" "on" \
"w3m" "テキストベースWebブラウザ" "on" \
"wget" "ファイルダウンロードコマンド" "on" \
"wireless_tools" "無線LAN設定ツール" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in bind bridge-utils curl cyrus_sasl ethtool fetchmail iptables libidn libiec61883 libraw1394 libssh2 mailx metamail ncftp ntp postfix ppp procmail rsync setserial w3m wget wireless_tools  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in bind bridge-utils curl cyrus_sasl ethtool fetchmail iptables libidn libiec61883 libraw1394 libssh2 mailx metamail ncftp ntp postfix ppp procmail rsync setserial w3m wget wireless_tools  ; 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
