Ajout du script d'attente de vert
darcs-hash:20080512112844-ffbb2-d3d62845586a083a9f5d383b4d4353e2adccba36.gz
This commit is contained in:
parent
17cfe36d55
commit
326cf88dab
5 changed files with 35 additions and 0 deletions
|
@ -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>
|
||||
|
|
20
Cfg/etc/init.d/attendre-vert/attendre-vert
Executable file
20
Cfg/etc/init.d/attendre-vert/attendre-vert
Executable 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 !"
|
8
Cfg/etc/init.d/attendre-vert/attendre-vert.H_vert.adm.crans.org
Executable file
8
Cfg/etc/init.d/attendre-vert/attendre-vert.H_vert.adm.crans.org
Executable 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..."
|
3
Cfg/etc/init.d/attendre-vert/info.xml
Normal file
3
Cfg/etc/init.d/attendre-vert/info.xml
Normal file
|
@ -0,0 +1,3 @@
|
|||
<FileInfo>
|
||||
<Info owner='root' group='root' perms='0755' encoding='base64'/>
|
||||
</FileInfo>
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue