"Fossies" - the Fresh Open Source Software Archive

Member "freeha-1.0/startdemon" (23 Nov 2006, 630 Bytes) of package /linux/privat/old/freeha-1.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 
    3 # This script needs to be customised FOR EACH NODE,
    4 # since there needs to be IP addresses specific to each node.
    5 # Contrariwise, the NET part should stay the same for all nodes.
    6 
    7 
    8 PATH=$PATH:/opt/freeha/bin:/opt/freeha/bin/service_scripts
    9 
   10 export PATH
   11 
   12 
   13 IP1="-a 10.1.1.10"
   14 IP2="-b 10.1.2.10"
   15 #IP3="-c 10.1.3.10"
   16 
   17 NET1="-A 10.1.1.255"
   18 NET2="-B 10.1.2.255"
   19 #NET3="-C 10.1.3.255"
   20 
   21 #Use this if you have more than 2 nodes.
   22 #NODES="-n 3"
   23 
   24 case $1 in
   25     start)
   26         freehad $NODES $IP1 $NET1 $IP2 $NET2 $IP3 $NET3 </dev/null >/dev/null 2>&1 &
   27     ;;
   28     stop)
   29         pkill freehad
   30     ;;
   31     *)
   32         echo "Usage: $0 {start|stop}"
   33         exit 1
   34     ;;
   35 esac
   36