Subversion Repositories ALCASAR

Rev

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

Rev 2867 Rev 2870
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-conf.sh 2867 2020-10-24 14:33:04Z rexy $
2
# $Id: alcasar-conf.sh 2870 2020-10-27 23:16:41Z 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 111... Line 111...
111
# copy alcasar.conf parameters
111
# copy alcasar.conf parameters
112
                PREVIOUS_VERSION=`grep ^VERSION= $DIR_UPDATE/etc/alcasar.conf|cut -d"=" -f2`
112
                PREVIOUS_VERSION=`grep ^VERSION= $DIR_UPDATE/etc/alcasar.conf|cut -d"=" -f2`
113
                MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`
113
                MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`
114
                MIN_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f2`
114
                MIN_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f2`
115
                UPD_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f3|cut -c1`
115
                UPD_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f3|cut -c1`
116
                for line in `cat $DIR_UPDATE/etc/alcasar.conf | grep "=" | grep -Ev "^#| |VERSION|INSTALL_DATE|PUBLIC|GW|DNS|SMS|EXTIF|INTIF"`
116
                for line in `cat $DIR_UPDATE/etc/alcasar.conf | grep "=" | grep -Ev "^#| |VERSION|INSTALL_DATE|PUBLIC|GW|SMS|EXTIF|INTIF"`
117
                do
117
                do
118
                        key=`echo $line | cut -d"=" -f1`
118
                        key=`echo $line | cut -d"=" -f1`
119
                        key=$key=
119
                        key=$key=
120
                        value=`echo $line|cut -d"=" -f2-`
120
                        value=`echo $line|cut -d"=" -f2-`
121
                        if [ "$value" != "" ]
121
                        if [ "$value" != "" ]
Line 285... Line 285...
285
                if [ $PUBLIC_IP_MASK == "dhcp" ]
285
                if [ $PUBLIC_IP_MASK == "dhcp" ]
286
                then
286
                then
287
                        cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$EXTIF
287
                        cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$EXTIF
288
DEVICE=$EXTIF
288
DEVICE=$EXTIF
289
BOOTPROTO=dhcp
289
BOOTPROTO=dhcp
290
DNS1=$DNS1
290
DNS1=127.0.0.1
291
PEERDNS=no
291
PEERDNS=no
292
RESOLV_MODS=yes
292
RESOLV_MODS=yes
293
ONBOOT=yes
293
ONBOOT=yes
294
METRIC=10
294
METRIC=10
295
MII_NOT_SUPPORTED=yes
295
MII_NOT_SUPPORTED=yes
Line 305... Line 305...
305
DEVICE=$EXTIF
305
DEVICE=$EXTIF
306
BOOTPROTO=static
306
BOOTPROTO=static
307
IPADDR=$PUBLIC_IP
307
IPADDR=$PUBLIC_IP
308
NETMASK=$PUBLIC_NETMASK
308
NETMASK=$PUBLIC_NETMASK
309
GATEWAY=$PUBLIC_GATEWAY
309
GATEWAY=$PUBLIC_GATEWAY
310
DNS1=$DNS1
310
DNS1=127.0.0.1
311
RESOLV_MODS=yes
311
RESOLV_MODS=yes
312
ONBOOT=yes
312
ONBOOT=yes
313
METRIC=10
313
METRIC=10
314
MII_NOT_SUPPORTED=yes
314
MII_NOT_SUPPORTED=yes
315
IPV6INIT=no
315
IPV6INIT=no