Ajout du script d'attente de vert

darcs-hash:20080512112844-ffbb2-d3d62845586a083a9f5d383b4d4353e2adccba36.gz
This commit is contained in:
Nicolas Dandrimont 2008-05-12 13:28:44 +02:00
parent 17cfe36d55
commit 326cf88dab
5 changed files with 35 additions and 0 deletions

View file

@ -1,4 +1,6 @@
<Bundle name="portmap">
<Package name="portmap"/>
<Service name="portmap"/>
<ConfigFile name="/etc/init.d/attendre-vert" />
<Action name="ln-attendre-vert" />
</Bundle>

View file

@ -0,0 +1,20 @@
#! /bin/bash
#
# Attendre-vert : script d'attente de vert au démarrage du serveur
#
# Géré par Bcfg2 (Plugin Cfg)
#
echo -n "Attente de vert...."
while ! fping -c1 -q vert.adm.crans.org 2>/dev/null; do
echo -n .
sleep 60
done
echo
echo -n "Ping de vert OK ! Attente aleatoire... "
sleep $((30 + $RANDOM/(32768.)*150))
echo "OK !"

View file

@ -0,0 +1,8 @@
#! /bin/bash
#
# Attendre-vert : script d'attente de vert au démarrage du serveur
#
# Géré par Bcfg2 (Plugin Cfg)
#
echo "Je suis vert, je vais pas m'attendre quand meme..."

View file

@ -0,0 +1,3 @@
<FileInfo>
<Info owner='root' group='root' perms='0755' encoding='base64'/>
</FileInfo>

View file

@ -61,4 +61,6 @@
<Service name="nut" status="on"/>
<Service name="portmap" status="on"/>
<Action name="ln-attendre-vert" timing="post" when="modified" status="check"
command="ln -s ../init.d/attendre-vert /etc/rcS.d/S41attendre-vert" />
</Rules>