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

le-proinfodata: Do not ask for INEP on the live-cd

The sanity check was rewritten..
Signed-off-by: 's avatarDiego Pasqualin <dpasqualin@c3sl.ufpr.br>
parent bebf0503
......@@ -2,7 +2,7 @@
# Copyright (C) 2004-2012 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-edubar
# This file is part of le-proinfodata
#
# exec_dialog.sh is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
......@@ -58,21 +58,25 @@ function call_dialog_inep_mult_on () {
}
export LANG="pt_BR.UTF-8"
if [ -f $F_INEP ]; then
exit
else
#This "if" is to prevent the script run on logout
if [ -f $F_LOCK ]; then
exit
else
#This 'if' checks if in computer have multiterminal, if 1 then this isn't multiterminal.
if [ $(dpkg -l | grep "le-multiterminal") -eq 1 ]; then
touch $F_LOCK
call_dialog_inep_mult_off
else
touch $F_LOCK
call_dialog_inep_mult_on
fi
fi
# SANITY CHECK -------------------------------------------------------
# Do not run script if we are on live-cd
# or the INEP code is already set
# or we are logging out
if dpkg --get-selections "ubiquity-le" | grep -q 'install$' ||
[ -f $F_INEP ] ||
[ -f $F_LOCK ]; then
exit 0
fi
# --------------------------------------------------------------------
# Check whether the computer is running on a the multiterminal
if dpkg --get-selections "le-multiterminal" | grep -q 'install$'; then
touch $F_LOCK
call_dialog_inep_mult_off
else
touch $F_LOCK
call_dialog_inep_mult_on
fi
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment