Commit 0fa1e67a authored by Diego Pasqualin's avatar Diego Pasqualin

Merge branch 'master' of git.c3sl.ufpr.br:./le5/unstable

parents 78bd141a 1d94942c
le-proinfodata-installer:
=========================
Instalador do PROINFODATA no LE
......@@ -32,6 +32,9 @@ case $1 in
;;
esac
# Gera o le-proinfodata.deb
./le-proinfodata-deb.sh
VERSAO="${MAJOR}.${MINOR}.${REVISION}"
echo "$VERSAO" > VERSAO
......
#!/bin/bash
# This script generates the le-proinfodata debian package
# Copyright (C) 2010-2012 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-proinfodata-installer
#
# le-proinfodata-installer is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
PREFIX="$(dirname $(readlink -f $0))"
LEPIDDEST="${PREFIX}/pacote/etc/le-proinfodata-installer"
cd ../le-proinfodata
# Generate the debian package
if ! ./gerar.sh; then
printf "ERROR (3): problems while generating le-proinfodata deb.\n"
exit 3
fi
# Ensure the directory where the le-proinfodata deb should be placed exists
mkdir -p "${LEPIDDEST}"
# Get the most updated deb
LEPIDDEB="$(ls | grep le-proinfodata | sort | tail -n 1)"
# Copy the le-proinfodata debian package to the correct place
cp "${LEPIDDEB}" "${LEPIDDEST}/"
......@@ -4,4 +4,12 @@ Maintainer: <proinfodata@c3sl.ufpr.br>
Architecture: i386
Section: main
Priority: important
Description: Installer of the agent of PROINFODATA project designed for LE
Depends: dialog, wget, passwd, sudo, cron, bash, coreutils
Description: Installer of the agent of PROINFODATA project designed for LE
Coleta de dados do projeto ProInfo/MEC de inclusão digital nas escolas
públicas brasileiras (PROINFODATA) is a project supported by Ministério da
Educação e Cultura (MEC) that collects some information about computer
laboratories at public schools in Brazil and make these data avaiable
through a website.
This agent periodically collects the data of the computer that it is
installed and sends them to a webservice running on internet.
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-proinfodata-installer
#
# le-proinfodata-installer is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# Set le-proinfodata-installer to run during boot
update-rc.d le-proinfodata-installer defaults 90
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-proinfodata-installer
#
# le-proinfodata-installer is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# Unset le-proinfodata-installer to not run during boot
update-rc.d -f le-proinfodata-installer remove
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-proinfodata-installer
#
# le-proinfodata-installer is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# Check if it's running on the live CD by checking the installation of ubiquity
if ! dpkg -l ubiquity-le\* 2>/dev/null | grep -q '^ii'; then
# Is the package le-proinfodata installed?
if ! dpkg -l le-proinfodata 2>/dev/null | grep -q '^ii'; then
# Install le-inep
dpkg -i /etc/le-proinfodata-installer/le-inep_*.deb
# Install le-proinfodata
dpkg -i /etc/le-proinfodata-installer/le-proinfodata_*.deb
# Should le-multiterminal be installed?
if dpkg -l le-multiterminal-installer 2>/dev/null | grep -q '^ii'; then
# Wait while it is not installed
while ! dpkg -l le-multiterminal 2>/dev/null | grep -q '^ii'; do
sleep 2
done
fi
# Reboot
reboot
fi
fi
C3SL - Centro de Computacao Cientifica e Software Livre
Adriano da Luz
Bruno Cesar Ribas
Carlos Carvalho
Cleide Luzia Bonfim Possamai
Danilo Kiyoshi Simizu Yorinori
Diego Giovane Pasqualin
Eduardo Todt
Erik Alexandre Pucci
Felipe Cys Laskoski
Guilherme Zasyeki Machado
Josiney de Souza
Juliana Bueno
Klismann Smoger Mottin
Laura Sanchez Garcia
Luis Carlos Erpen de Bona
Marcela Saragioto
Marcos Castilho
Pedro Eugenio Rocha
Renan Franca De Miranda
Ricardo Tavares De Oliveira
Rubens Massayuki Suguimoto
Thiago Henrique Dos Santos Picharski
Tiago Rodrigo Kepe
Victor Tarabola Cortiano
Vinicius Kwiecien Ruoso
le-proinfodata:
===============
Coleta de dados do projeto ProInfo/MEC de inclusão digital nas escolas
públicas brasileiras (PROINFODATA) is a project supported by Ministério da
Educação e Cultura (MEC) that collects some information about computer
laboratories at public schools in Brazil and make these data avaiable
through a website.
This agent periodically collects the data of the computer that it is
installed and sends them to a webservice running on internet.
......@@ -32,6 +32,9 @@ case $1 in
;;
esac
# Gera o instalador do PROINFODATA
./proinfodata-installer.sh
VERSAO="${MAJOR}.${MINOR}.${REVISION}"
echo "$VERSAO" > VERSAO
......
......@@ -4,4 +4,13 @@ Maintainer: <proinfodata@c3sl.ufpr.br>
Architecture: i386
Section: main
Priority: important
Pre-Depends: le-inep
Depends: dialog, wget, passwd, sudo, cron, bash, coreutils, bzip2
Description: Agent of PROINFODATA project designed for the LE project
Coleta de dados do projeto ProInfo/MEC de inclusão digital nas escolas
públicas brasileiras (PROINFODATA) is a project supported by Ministério da
Educação e Cultura (MEC) that collects some information about computer
laboratories at public schools in Brazil and make these data avaiable
through a website.
This agent periodically collects the data of the computer that it is
installed and sends them to a webservice running on internet.
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of proinfodata
#
# proinfodata is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# This is the postinst of proinfodata
SEED_MEC_HOME="/opt/seed_mec"
BACKUP_DIR="/opt/seed_mec_backup"
LBFILE="/etc/le-proinfodata/le.zone*"
# Descompressing the local base
bunzip2 $LBFILE
# Install the PROINFODATA agent
bash /tmp/agent.run
# Check if there is a backup for the inep and proxy files and restore it
if test -f "${BACKUP_DIR}/SEED2/client/conf/inep"; then
# Restore the inep and proxy files, and also their backup and md5sum
# counterparts
for FILE in "proxy" "inep"; do
cp -af "${BACKUP_DIR}/SEED2/.backup/client/conf/${FILE}" \
"${SEED_MEC_HOME}/SEED2/.backup/client/conf/${FILE}"
cp -af "${BACKUP_DIR}/SEED2/.md5sum/client/conf/${FILE}" \
"${SEED_MEC_HOME}/SEED2/.md5sum/client/conf/${FILE}"
cp -af "${BACKUP_DIR}/SEED2/.md5sum/.backup/client/conf/${FILE}" \
"${SEED_MEC_HOME}/SEED2/.md5sum/.backup/client/conf/${FILE}"
cp -af "${BACKUP_DIR}/SEED2/client/conf/${FILE}" \
"${SEED_MEC_HOME}/SEED2/client/conf/${FILE}"
done
# Remove the auxiliar directory
rm -rf "${BACKUP_DIR}"
fi
# Make sure the owner of ~seed_mec is seed_mec
chown -R seed_mec:seed_mec "${SEED_MEC_HOME}"
# Remove seed_mec from the KDM user list
kwriteconfig --file /etc/kde4/kdm/kdmrc --group X-*-Greeter \
--key HiddenUsers seed_mec
exit 0
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-proinfodata
#
# le-proinfodata is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# This is the postrm of proinfodata
SEED_MEC_HOME="/opt/seed_mec"
if test "$1" != "purge" -a -f "${SEED_MEC_HOME}/SEED2/client/conf/inep"; then
rm -rf "${SEED_MEC_HOME}/SEED2/"[^c]* \
"${SEED_MEC_HOME}/SEED2/"c[^l]* \
"${SEED_MEC_HOME}/SEED2/client/"[^c]* \
"${SEED_MEC_HOME}/SEED2/client/common.sh" \
"${SEED_MEC_HOME}/SEED2/client/conf/version"
else
rm -rf "${SEED_MEC_HOME}"
fi
# Files to divert
DIVERTS="
/etc/init/dbus.conf \
/etc/init/tty1.conf
"
if [[ "$1" != "upgrade" ]]; then
for file in $DIVERTS; do
dpkg-divert --package le-proinfodata --remove --rename \
--divert ${file}{.real,}
done
fi
exit 0
#!/bin/bash -e
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of proinfodata
#
# proinfodata is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# This is the preinst of proinfodata
SEED_MEC_HOME="/opt/seed_mec"
CONF="${SEED_MEC_HOME}/SEED2/client/conf/"
BKPCONF="${SEED_MEC_HOME}/SEED2/.backup/client/conf/"
MD5CONF="${SEED_MEC_HOME}/SEED2/.md5sum/client/conf/"
MD5BKPCONF="${SEED_MEC_HOME}/SEED2/.md5sum/.backup/client/conf/"
BKP="/opt/seed_mec_backup"
BKP_CONF="${BKP}/SEED2/client/conf/"
BKP_BKPCONF="${BKP}/SEED2/.backup/client/conf/"
BKP_MD5CONF="${BKP}/SEED2/.md5sum/client/conf/"
BKP_MD5BKPCONF="${BKP}/SEED2/.md5sum/.backup/client/conf/"
# Check if there is a previously configured INEP and no backup before creating
# the backup for both the inep and proxy files
if test -f "${CONF}/inep" -a ! -f "${BKP_CONF}/inep"; then
# Create auxiliar directories
mkdir -p "${BKP_CONF}"
mkdir -p "${BKP_BKPCONF}"
mkdir -p "${BKP_MD5CONF}"
mkdir -p "${BKP_MD5BKPCONF}"
# Copy the inep and proxy files, and also their backup and md5sum
# counterparts. The last copied file is the inep, so the verification of its
# existence always means the other ones also exist
for FILE in "proxy" "inep"; do
if test -f "${BKPCONF}/${FILE}"; then
cp -af "${BKPCONF}/${FILE}" "${BKP_BKPCONF}/${FILE}"
else
cp -af "${CONF}/${FILE}" "${BKP_BKPCONF}/${FILE}"
fi
if test -f "${MD5CONF}/${FILE}"; then
cp -af "${MD5CONF}/${FILE}" "${BKP_MD5CONF}/${FILE}"
else
md5sum "${CONF}/${FILE}" | cut -d' ' -f1 > "${BKP_MD5CONF}/${FILE}"
fi
if test -f "${MD5BKPCONF}/${FILE}"; then
cp -af "${MD5BKPCONF}/${FILE}" "${BKP_MD5BKPCONF}/${FILE}"
else
md5sum "${CONF}/${FILE}" | cut -d' ' -f1 > \
"${BKP_MD5BKPCONF}/${FILE}"
fi
cp -af "${CONF}/${FILE}" "${BKP_CONF}/${FILE}"
done
fi
# Files to divert
DIVERTS="
/etc/init/dbus.conf \
/etc/init/tty1.conf
"
# Divert files
for file in $DIVERTS; do
dpkg-divert --package le-proinfodata --add --rename \
--divert ${file}{.real,}
done
exit 0
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of proinfodata
#
# proinfodata is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# This is the prerm of proinfodata
# Delete the crontab of seed_mec
crontab -u seed_mec -r
# Delete user seed_mec
userdel seed_mec
# Delete group seed_mec
groupdel seed_mec
exit 0
# dbus - D-Bus system message bus
#
# The D-Bus system message bus allows system daemons and user applications
# to communicate.
description "D-Bus system message bus"
start on local-filesystems
stop on deconfiguring-networking
expect fork
respawn
pre-start script
# Does the INEP file exist?
INEPFILE=/opt/seed_mec/SEED2/client/conf/inep
if ! test -f ${INEPFILE} -a -n "$(cat ${INEPFILE})"; then
/usr/sbin/le-askINEP.sh < /dev/tty1
fi
mkdir -p /var/run/dbus
chown messagebus:messagebus /var/run/dbus
exec dbus-uuidgen --ensure
end script
exec dbus-daemon --system --fork --activation=upstart
post-start exec kill -USR1 1
post-stop exec rm -f /var/run/dbus/pid
# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345] and (
not-container or
container CONTAINER=lxc or
container CONTAINER=lxc-libvirt)
stop on runlevel [!2345]
respawn
INEPFILE=/opt/seed_mec/SEED2/client/conf/inep
# Do not open getty if a dialog is about to be shown
if test -f ${INEPFILE} -a -n "$(cat ${INEPFILE})"; then
exec /sbin/getty -8 38400 tty1
fi
This diff is collapsed.
This diff is collapsed.
# LE-BASE
C3SL - Centro de Computacao Cientifica e Software Livre
Adriano da Luz
Bruno Cesar Ribas
Carlos Carvalho
Cleide Luzia Bonfim Possamai
Eduardo Todt
Daniel Weingaertner
Danilo Kiyoshi Simizu Yorinori
Diego Giovane Pasqualin
Edson Ramiro Lucas Filho
Eduardo Cunha de Almeida
Erik Alexandre Pucci
Fabiano Silva
Jorge Augusto Meira
Josiney de Souza
Juliana Bueno
Klismann Smoger Mottin
Laura Sanchez Garcia
Lucio Foltran da Silva
Luis Carlos Erpen de Bona
Marcos Castilho
Pedro Eugenio Rocha
Renan Franca De Miranda
Ricardo Tavares De Oliveira
Rubens Massayuki Suguimoto
Thiago Henrique Dos Santos Picharski
Tiago Rodrigo Kepe
Vinicius Kwiecien Ruoso
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-proinfodata
#
# le-proinfodata is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# This script will ask some configurations needed by the PROINFODATA agent
# Check if it's running on the live CD by checking the installation of ubiquity
if dpkg -l ubiquity-le 2>/dev/null | grep -q '^ii'; then
# ubiquity is installed, so we are in the live CD. Exit.
exit 0
fi
DIALOG="dialog --backtitle PROINFODATA --shadow --title"
TTY=/dev/tty1
TIMETOREAD=3
# LE ZONE
LEZONE=/etc/le-proinfodata/le.zone
# INEP file
SEED_HOME=/opt/seed_mec
INEPFILE="${SEED_HOME}/SEED2/client/conf/inep"
MD5INEPFILE="${SEED_HOME}/SEED2/.md5sum/client/conf/inep"
BACKUPINEPFILE="${SEED_HOME}/SEED2/.backup/client/conf/inep"
MD5BACKUPINEPFILE="${SEED_HOME}/SEED2/.md5sum/.backup/client/conf/inep"
# Proxy file
PROXYFILE="${SEED_HOME}/SEED2/client/conf/proxy"
MD5PROXYFILE="${SEED_HOME}/SEED2/.md5sum/client/conf/proxy"
BACKUPPROXYFILE="${SEED_HOME}/SEED2/.backup/client/conf/proxy"
MD5BACKUPPROXYFILE="${SEED_HOME}/SEED2/.md5sum/.backup/client/conf/proxy"
# "I'll do it later" message
LATER="quero digitar o inep da minha escola depois"
# Create a temp file to store some dialog answers.
ans=$(mktemp)
# test_exit exits if the given argument is equal to 255.
# This is used to test if the user pressed the ESC key.
function test_exit() {
if test $1 -eq 255 ; then
# Remove ans file.
rm -f ${ans}
# Start it again and exit.
$0
exit 0
fi
}
# Welcome message
${DIALOG} PROINFODATA --msgbox "
O agente de acompanhamento do projeto PROINFODATA foi instalado nesta
máquina. Para torná-lo funcional, entretanto, é necessário fornecer
informações sobre as configurações de proxy, além do número INEP da
instituição. Para saber mais sobre o projeto, visite o site
http://seed.c3sl.ufpr.br ." 0 0 > ${TTY}
valid=1
while test ${valid} -ne 0; do
# Ask INEP
${DIALOG} INEP --inputbox " Digite seu INEP ou a mensagem '${LATER}':" 0 0 > ${TTY} 2> ${ans}
test_exit $?
INEP=$(cat ${ans})
# INEP empty, try again
if test -z "${INEP}"; then
continue
fi
# "Later" message?
if [[ "${INEP}" == "${LATER}" ]]; then
${DIALOG} ATENÇÃO --msgbox "
O número INEP será requisitado novamente na próxima vez que este computador for ligado." 0 0 > ${TTY}
clear > ${TTY}
exit 0
fi
# Search the INEP in our base
LINE=$(grep "^ ${INEP} " ${LEZONE})
if [[ -z "${LINE}" ]]; then
# Warning!
${DIALOG} ATENÇÃO --msgbox "
O INEP fornecido é inválido. Por favor verifique o número INEP
correspondente a sua instituição de ensino e tente novamente ou digite
'${LATER}'." 0 0 > ${TTY}
valid=1
else
state=$(echo ${LINE} | awk -F'|' '{print $2}')
city=$(echo ${LINE} | awk -F'|' '{print $3}')
school=$(echo ${LINE} | awk -F'|' '{print $4}')
zip=$(echo ${LINE} | awk -F'|' '{print $5}')
${DIALOG} Confirmação --yesno "\
INEP: ${INEP} \n\
Estado: ${state} \n\
Cidade: ${city} \n\
Escola: ${school} \n\
CEP: ${zip} \n\
Essas informações estão corretas?" 0 0 > ${TTY}
valid=$?
test_exit ${valid}
fi
done
# INEP set. Ask for proxy configuration
${DIALOG} proxy --yesno "Você possui informações de proxy?" 0 0 > ${TTY}
has_proxy=$?
test_exit ${has_proxy}
if test ${has_proxy} -eq 0; then
valid=1
while test ${valid} -ne 0; do
declare -a formans
${DIALOG} proxy --form "Preencha as informações de proxy:" 12 55 5 \
"Host:" 1 1 "" 1 20 100 100 \
"Porta:" 2 1 "" 2 20 100 100 \
"Usuario:" 3 1 "" 3 20 100 100 \
> ${TTY} 2> ${ans}
test_exit $?
i=0
while read line; do
formans[${i}]=${line}
(( i++ ))
done < ${ans}
phost=${formans[0]}
pport=${formans[1]}
puid=${formans[2]}
equalpass=1
while test ${equalpass} -ne 0 ; do
${DIALOG} proxy --insecure --passwordform "Preencha a senha do \
proxy, se necessário:" 12 55 5 \
"Senha:" 1 1 "" 1 20 100 100 \
"Confirmar Senha:" 2 1 "" 2 20 100 100 \
> ${TTY} 2> ${ans}
test_exit $?
i=0
while read line; do