Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-conf.sh 2947 2021-04-21 16:36:52Z rexy $
|
2 |
# $Id: alcasar-conf.sh 2956 2021-05-24 19:57:17Z rexy $
|
3 |
|
3 |
|
4 |
# alcasar-conf.sh
|
4 |
# alcasar-conf.sh
|
5 |
# by REXY
|
5 |
# by 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 |
|
7 |
|
Line 122... |
Line 122... |
122 |
## Load an archive conf file ##
|
122 |
## Load an archive conf file ##
|
123 |
###################################################
|
123 |
###################################################
|
124 |
--load|-load)
|
124 |
--load|-load)
|
125 |
cd /var/tmp || { echo "Unable to find /var/tmp directory"; }
|
125 |
cd /var/tmp || { echo "Unable to find /var/tmp directory"; }
|
126 |
tar -xf alcasar-conf.tar.gz
|
126 |
tar -xf alcasar-conf.tar.gz
|
127 |
# copy alcasar.conf parameters
|
127 |
# update alcasar.conf parameters
|
128 |
PREVIOUS_VERSION=`grep ^VERSION= $DIR_UPDATE/etc/alcasar.conf|cut -d"=" -f2`
|
128 |
PREVIOUS_VERSION=`grep ^VERSION= $DIR_UPDATE/etc/alcasar.conf|cut -d"=" -f2`
|
129 |
MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`
|
129 |
MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`
|
130 |
MIN_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f2`
|
130 |
MIN_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f2`
|
131 |
UPD_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f3|cut -c1`
|
131 |
UPD_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f3|cut -c1`
|
132 |
for line in `cat $DIR_UPDATE/etc/alcasar.conf | grep "=" | grep -Ev "^#| |VERSION|INSTALL_DATE|PUBLIC|GW|EXTIF|INTIF"`
|
132 |
for line in `cat $DIR_UPDATE/etc/alcasar.conf | grep "=" | grep -Ev "^#| |VERSION|INSTALL_DATE|PUBLIC|GW|EXTIF|INTIF"`
|