Subversion Repositories ALCASAR

Rev

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

Rev 2938 Rev 2941
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2938 2021-04-06 22:17:19Z rexy $
2
#  $Id: alcasar.sh 2941 2021-04-12 17:21:42Z 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 2174... Line 2174...
2174
	echo "WIFI4EU_CODE=123e4567-e89b-12d3-a456-426655440000" >> $CONF_FILE
2174
	echo "WIFI4EU_CODE=123e4567-e89b-12d3-a456-426655440000" >> $CONF_FILE
2175
# Prompt customisation (colors)
2175
# Prompt customisation (colors)
2176
	[ -e /etc/bashrc.default ]  || cp /etc/bashrc /etc/bashrc.default
2176
	[ -e /etc/bashrc.default ]  || cp /etc/bashrc /etc/bashrc.default
2177
	cp -f $DIR_CONF/bashrc /etc/. ; chmod 644 /etc/bashrc ; chown root:root /etc/bashrc
2177
	cp -f $DIR_CONF/bashrc /etc/. ; chmod 644 /etc/bashrc ; chown root:root /etc/bashrc
2178
	$SED "s?^ORGANISME.*?ORGANISME=$ORGANISME?g" /etc/bashrc
2178
	$SED "s?^ORGANISME.*?ORGANISME=$ORGANISME?g" /etc/bashrc
-
 
2179
	$SED "s?^alias ll=.*?alias ll=\"ls -al --color\"?g" /etc/profile.d/60alias.sh
2179
# sudoers configuration for "apache" & "sysadmin"
2180
# sudoers configuration for "apache" & "sysadmin"
2180
	[ -e /etc/sudoers.default ]  || cp /etc/sudoers /etc/sudoers.default
2181
	[ -e /etc/sudoers.default ]  || cp /etc/sudoers /etc/sudoers.default
2181
	cp -f $DIR_CONF/sudoers /etc/ ; chmod 440 /etc/sudoers ; chown root:root /etc/sudoers
2182
	cp -f $DIR_CONF/sudoers /etc/ ; chmod 440 /etc/sudoers ; chown root:root /etc/sudoers
2182
	$SED "s?^Host_Alias.*?Host_Alias	LAN_ORG=$PRIVATE_NETWORK/$PRIVATE_NETMASK,localhost		#réseau de l'organisme?g" /etc/sudoers
2183
	$SED "s?^Host_Alias.*?Host_Alias	LAN_ORG=$PRIVATE_NETWORK/$PRIVATE_NETMASK,localhost		#réseau de l'organisme?g" /etc/sudoers
2183
# Modify some logrotate files (gammu, ulogd)
2184
# Modify some logrotate files (gammu, ulogd)
Line 2382... Line 2383...
2382
				echo "*** 'debug' : end of function '$func' ***"
2383
				echo "*** 'debug' : end of function '$func' ***"
2383
				read
2384
				read
2384
			fi
2385
			fi
2385
		done
2386
		done
2386
# RPMs install
2387
# RPMs install
-
 
2388
			if [ "$mode" == "update" ] # to avoid updating unbound during the V5.3.3 update (to be removed after this version)
-
 
2389
			then
-
 
2390
				echo "/^unbound/" >> /etc/urpmi/skip.list
-
 
2391
			fi
2387
		$DIR_SCRIPTS/alcasar-urpmi.sh
2392
		$DIR_SCRIPTS/alcasar-rpm.sh
2388
		if [ "$?" != "0" ]
2393
		if [ "$?" != "0" ]
2389
		then
2394
		then
2390
			exit 0
2395
			exit 0
2391
		fi
2396
		fi
2392
		if [ -e $CONF_FILE ]
2397
		if [ -e $CONF_FILE ]