Subversion Repositories ALCASAR

Rev

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

Rev 1249 Rev 1250
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 1249 2013-10-22 22:09:01Z richard $ 
2
#  $Id: alcasar.sh 1250 2013-10-24 14:50:30Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
 
5
 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
7
# Ce programme est un logiciel libre ; This software is free and open source
7
# Ce programme est un logiciel libre ; This software is free and open source
Line 407... Line 407...
407
EOF
407
EOF
408
# config /etc/hosts
408
# config /etc/hosts
409
	[ -e /etc/hosts.default ] || cp /etc/hosts /etc/hosts.default
409
	[ -e /etc/hosts.default ] || cp /etc/hosts /etc/hosts.default
410
	cat <<EOF > /etc/hosts
410
	cat <<EOF > /etc/hosts
411
127.0.0.1	localhost
411
127.0.0.1	localhost
412
$PRIVATE_IP	$HOSTNAME $HOSTNAME.$DOMAIN
412
$PRIVATE_IP	$HOSTNAME.$DOMAIN
413
EOF
413
EOF
414
# Config eth0 (Internet)
414
# Config eth0 (Internet)
415
	cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$EXTIF
415
	cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$EXTIF
416
DEVICE=$EXTIF
416
DEVICE=$EXTIF
417
BOOTPROTO=static
417
BOOTPROTO=static
Line 1244... Line 1244...
1244
</Directory>
1244
</Directory>
1245
EOF
1245
EOF
1246
#Ajout du paramètre : IP d'écoute pour le collecteur (nfcapd)
1246
#Ajout du paramètre : IP d'écoute pour le collecteur (nfcapd)
1247
$SED s?'\$ziparg $extensions.*?\$ziparg $extensions -b 127.0.0.1";'?g /usr/libexec/NfSenRC.pm 
1247
$SED s?'\$ziparg $extensions.*?\$ziparg $extensions -b 127.0.0.1";'?g /usr/libexec/NfSenRC.pm 
1248
#Configuration du délais d'expiration des captures du profile "live"
1248
#Configuration du délais d'expiration des captures du profile "live"
1249
	nfsen -m live -e 62d
1249
	nfsen -m live -e 62d 2>/dev/null
1250
#Suppression des sources de nfsen
1250
#Suppression des sources de nfsen
1251
	cd $DirTmp
1251
	cd $DirTmp
1252
	rm -rf /tmp/nfsen-1.3.6p1/
1252
	rm -rf /tmp/nfsen-1.3.6p1/
1253
} # End of param_nfsen
1253
} # End of param_nfsen
1254
 
1254
 
Line 1615... Line 1615...
1615
	fi
1615
	fi
1616
# disable log_martians (ALCASAR is often installed between two private network addresses) 
1616
# disable log_martians (ALCASAR is often installed between two private network addresses) 
1617
	sysctl -w net.ipv4.conf.all.log_martians=0
1617
	sysctl -w net.ipv4.conf.all.log_martians=0
1618
# On supprime la gestion du <CTRL>+<ALT>+<SUPPR> et des Magic SysReq Keys
1618
# On supprime la gestion du <CTRL>+<ALT>+<SUPPR> et des Magic SysReq Keys
1619
# ???	$SED "s?^ALLOW_REBOOT=.*?ALLOW_REBOOT=no?g" /etc/security/msec/level.fileserver
1619
# ???	$SED "s?^ALLOW_REBOOT=.*?ALLOW_REBOOT=no?g" /etc/security/msec/level.fileserver
1620
# modification /etc/inittab
-
 
1621
	[ -e /etc/inittab.default ] || cp /etc/inittab /etc/inittab.default
-
 
1622
# We keep only 3 TTYs
-
 
1623
	$SED "s?^4.*?#&?g" /etc/inittab
-
 
1624
	$SED "s?^5.*?#&?g" /etc/inittab
-
 
1625
	$SED "s?^6.*?#&?g" /etc/inittab
-
 
1626
# switch to multi-users runlevel (instead of x11)
1620
# switch to multi-users runlevel (instead of x11)
1627
	ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
1621
	ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
1628
	$SED "s?^id.*?id:3:initdefault:?g" /etc/inittab
-
 
1629
#	GRUB modifications
1622
#	GRUB modifications
1630
# limit wait time to 3s
1623
# limit wait time to 3s
1631
# create an alcasar entry instead of linux-nonfb
1624
# create an alcasar entry instead of linux-nonfb
1632
# change display to 1024*768 (vga791)
1625
# change display to 1024*768 (vga791)
1633
	$SED "s?^timeout.*?timeout 3?g" /boot/grub/menu.lst
1626
	$SED "s?^timeout.*?timeout 3?g" /boot/grub/menu.lst