Line 1... |
Line 1... |
1 |
#!/bin/sh
|
1 |
#!/bin/sh
|
2 |
# $Id: alcasar.sh 293 2010-10-02 11:28:40Z franck $
|
2 |
# $Id: alcasar.sh 294 2010-10-05 22:01:03Z richard $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
|
5 |
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
|
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 87... |
Line 87... |
87 |
echo -n "Tests des paramètres réseau : "
|
87 |
echo -n "Tests des paramètres réseau : "
|
88 |
# On teste l'état du lien des interfaces réseau
|
88 |
# On teste l'état du lien des interfaces réseau
|
89 |
for i in $EXTIF $INTIF
|
89 |
for i in $EXTIF $INTIF
|
90 |
do
|
90 |
do
|
91 |
/sbin/ifconfig $i up
|
91 |
/sbin/ifconfig $i up
|
- |
|
92 |
/sbin/ip link set $i up
|
92 |
sleep 2
|
93 |
sleep 2
|
93 |
if [ "`/usr/sbin/ethtool $i|grep Link|cut -d' ' -f3`" != "yes" ]
|
94 |
if [ "`/usr/sbin/ethtool $i|grep Link|cut -d' ' -f3`" != "yes" ]
|
94 |
then
|
95 |
then
|
95 |
echo "Échec"
|
96 |
echo "Échec"
|
96 |
echo "Le lien réseau de la carte $i n'est pas actif."
|
97 |
echo "Le lien réseau de la carte $i n'est pas actif."
|
Line 973... |
Line 974... |
973 |
mkfs.ext4 -qF /tmp/havp-disk
|
974 |
mkfs.ext4 -qF /tmp/havp-disk
|
974 |
mkdir -p /var/tmp/havp /var/log/havp
|
975 |
mkdir -p /var/tmp/havp /var/log/havp
|
975 |
echo "# Entry for havp tmp files scan partition" >> /etc/fstab
|
976 |
echo "# Entry for havp tmp files scan partition" >> /etc/fstab
|
976 |
echo "/tmp/havp-disk /var/tmp/havp ext4 loop,mand,noatime,async" >> /etc/fstab
|
977 |
echo "/tmp/havp-disk /var/tmp/havp ext4 loop,mand,noatime,async" >> /etc/fstab
|
977 |
mount /var/tmp/havp
|
978 |
mount /var/tmp/havp
|
978 |
chown -R havp /var/tmp/havp /var/log/havp
|
979 |
chown -R havp /var/tmp/havp /var/log/havp /var/run/havp
|
979 |
# configuration d'HAVP
|
980 |
# configuration d'HAVP
|
980 |
[ -e /etc/havp/havp.config.default ] || cp /etc/havp/havp.config /etc/havp/havp.config.default
|
981 |
[ -e /etc/havp/havp.config.default ] || cp /etc/havp/havp.config /etc/havp/havp.config.default
|
981 |
$SED "/^REMOVETHISLINE/d" /etc/havp/havp.config
|
982 |
$SED "/^REMOVETHISLINE/d" /etc/havp/havp.config
|
982 |
$SED "s?^# PARENTPROXY.*?PARENTPROXY 127.0.0.1?g" /etc/havp/havp.config
|
983 |
$SED "s?^# PARENTPROXY.*?PARENTPROXY 127.0.0.1?g" /etc/havp/havp.config
|
983 |
$SED "s?^# PARENTPORT.*?PARENTPORT 3128?g" /etc/havp/havp.config
|
984 |
$SED "s?^# PARENTPORT.*?PARENTPORT 3128?g" /etc/havp/havp.config
|