168,16 → 168,20 |
else echo -n "ALCASAR Version "; echo -n $current_version ; echo " is already installed"; |
fi |
response=0 |
PTN='^[oOnNyY]$' |
PTN='^[12]$' |
until [[ $(expr $response : $PTN) -gt 0 ]] |
do |
if [ $Lang == "fr" ] |
then echo -n "Voulez-vous effectuer une mise à jour (O/n)? "; |
else echo -n "Do you want to update (Y/n)?"; |
then |
echo "Effectuer une mise à jour : tapez '1'" |
echo -n "Effectuer une réinstallation : Tapez '2' : " |
else |
echo "Perform an update : Hit '1'" |
echo -n "Perform a reinstallation : Hit '2' : " |
fi |
read response |
done |
if [ "$response" = "n" ] || [ "$response" = "N" ] |
if [ "$response" = "2" ] |
then |
rm -f /tmp/alcasar-conf* |
else |
505,7 → 509,7 |
PRIVATE_MAC=`/usr/sbin/ip link show $INTIF | grep ether | cut -d" " -f6| sed 's/:/-/g'| awk '{print toupper($0)}'` # MAC address of INTIF |
# Define Internet parameters |
DNS1=`grep ^nameserver /etc/resolv.conf|awk -F" " '{print $2}'|head -n 1` # 1st DNS server |
if [ "$DNS1" != "" ] && [ "$DNS1" != "127.0.0.1" ] |
if [ "$DNS1" == "" ] || [ "$DNS1" == "127.0.0.1" ] |
then |
if [ $Lang == "fr" ] |
then |
2330,8 → 2334,13 |
fi |
if [ -e $CONF_FILE ] |
then |
# Uninstall the running version |
$DIR_SCRIPTS/alcasar-uninstall.sh -update |
# Uninstall or update the running version |
if [ "$mode" == "update" ] |
then |
$DIR_SCRIPTS/alcasar-uninstall.sh -update |
else |
$DIR_SCRIPTS/alcasar-uninstall.sh -full |
fi |
fi |
# Test if manual update |
if [ -e /tmp/alcasar-conf*.tar.gz ] && [ "$mode" == "install" ] |