Subversion Repositories ALCASAR

Rev

Rev 2834 | Rev 2840 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2834 Rev 2835
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2834 2020-06-14 21:03:13Z rexy $
2
#  $Id: alcasar.sh 2835 2020-06-15 21:30:20Z rexy $
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
#  team@alcasar.net
7
#  team@alcasar.net
Line 2378... Line 2378...
2378
	if [ $DEBUG_ALCASAR == "on" ]
2378
	if [ $DEBUG_ALCASAR == "on" ]
2379
	then
2379
	then
2380
		echo "*** 'debug' : end of cleaning ***"
2380
		echo "*** 'debug' : end of cleaning ***"
2381
		read
2381
		read
2382
	fi
2382
	fi
2383
# Test if manual update
2383
# Test if conf file
2384
		if [ -e /var/tmp/alcasar-conf.tar.gz ] && [ "$mode" == "install" ]
2384
		if [ -e /var/tmp/alcasar-conf.tar.gz ]
2385
		then
2385
		then
2386
# Extract some info from the previous configuration file
2386
# Extract some info from the previous configuration file
2387
			cd /var/tmp
2387
			cd /var/tmp
2388
			tar -xf /var/tmp/alcasar-conf.tar.gz conf/etc/alcasar.conf
2388
			tar -xf /var/tmp/alcasar-conf.tar.gz conf/etc/alcasar.conf
2389
			cd $DIR_INSTALL
2389
			cd $DIR_INSTALL
2390
			if [ "mode" == "install" ]
2390
			if [ "mode" == "install" ] # don't display this if updating a running version
2391
			then
2391
			then
2392
				header_install
2392
				header_install
2393
				ORGANISME=`grep ^ORGANISM= conf/etc/alcasar.conf|cut -d"=" -f2`
2393
				ORGANISME=`grep ^ORGANISM= conf/etc/alcasar.conf|cut -d"=" -f2`
2394
				PREVIOUS_VERSION=`grep ^VERSION= conf/etc/alcasar.conf|cut -d"=" -f2`
2394
				PREVIOUS_VERSION=`grep ^VERSION= conf/etc/alcasar.conf|cut -d"=" -f2`
2395
				MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`
2395
				MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`