Penguin
Diff: RedHatMetaNetScripts
EditPageHistoryDiffInfoLikePages

Differences between version 6 and previous revision of RedHatMetaNetScripts.

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 6 Last edited on Wednesday, February 16, 2005 4:03:27 pm by AristotlePagaltzis Revert
Older page: version 5 Last edited on Wednesday, February 16, 2005 3:30:51 pm by AristotlePagaltzis Revert
@@ -21,9 +21,9 @@
 DESC="EtherneT over Udp Daemon" 
 IP=/bin/ip 
  
 # Check for the Etud configuration file 
-if [ [ ! -f ${ETUDCONF} ]; then 
+if [ ! -f ${ETUDCONF} ]; then 
  echo Could not find etud configuration file 
  exit 
 fi 
  
@@ -33,13 +33,13 @@
 PIDFILE=/var/run/Etud.pid 
 # Retrieve the real values from the config file if they exist 
 while read parameter value 
 do 
- if [ [ "$parameter" == "pidfile" ]; then  
- PIDFILE=`echo "$value" | tr -d '"'`  
- elif [ [ "$parameter" == "ctrlfile" ]; then 
+ if [ "$parameter" == "pidfile" ]; then  
+ PIDFILE=`echo "$value" | tr -d '"'`  
+ elif [ "$parameter" == "ctrlfile" ]; then 
  CTRLFILE=`echo "$value" | tr -d '"'` 
- elif [ [ "$parameter" == "ifname" ]; then 
+ elif [ "$parameter" == "ifname" ]; then 
  IFNAME=`echo "$value" | tr -d '"'` 
  fi 
 done < $ETUDCONF 
  
@@ -50,19 +50,19 @@
  
 case "$1" in 
 start) 
 echo -n "Starting Etud" 
- [ [ -e $CTRLFILE ] && { 
+ [ -e $CTRLFILE ] && { 
  echo "" 
  echo -n "Control file exists, checking to see if Etud lives? " 
  
- [ [ -e ${PIDFILE} ] || { 
+ [ -e ${PIDFILE} ] || { 
  echo "" 
  echo "No pidfile present, exiting" 
  exit 1; 
 
  # check that the pid in the pid file 
- [ [ x`cat ${PIDFILE}` == x`pidof ${NAME}` ] && { 
+ [ x`cat ${PIDFILE}` == x`pidof ${NAME}` ] && { 
  echo "... yes, aborting" 
  exit 1; 
  } || { 
  echo "... no, removing" 
@@ -129,13 +129,13 @@
  
  # Source function library. 
  . /etc/init.d/functions 
  
- if [ [ ! -f /etc/sysconfig/network ]; then 
+ if [ ! -f /etc/sysconfig/network ]; then 
  exit 0 
  fi 
  
- if [ [ ! -f /etc/sysconfig/wand ]; then 
+ if [ ! -f /etc/sysconfig/wand ]; then 
  exit 0 
  fi 
  
  . /etc/sysconfig/network 
@@ -148,17 +148,17 @@
  start() 
 
  echo -n $"Starting Etud: " 
  daemon $ETUD -l $EPORT -p /var/run/Etud.pid 
- [ [ "$?" -eq 0 ] && echo_success || echo_failure 
+ [ "$?" -eq 0 ] && echo_success || echo_failure 
  echo 
  echo -n $"Bringing up interface $WANIF: " 
  ifup $WANIF 
- [ [ "$?" -eq 0 ] && echo_success || echo_failure 
+ [ "$?" -eq 0 ] && echo_success || echo_failure 
  echo 
  echo -n $"Starting wand: " 
  daemon $WAND -i $SERVER -l $WPORT 
- [ [ "$?" -eq 0 ] && echo_success || echo_failure 
+ [ "$?" -eq 0 ] && echo_success || echo_failure 
  echo 
  service zebra start 
  service bgpd start 
 
@@ -168,13 +168,13 @@
  service bgpd stop 
  service zebra stop 
  echo -n $"Shutting down wand: " 
  killall wand 
- [ [ "$?" -eq 0 ] && echo_success || echo_failure 
+ [ "$?" -eq 0 ] && echo_success || echo_failure 
  echo 
  echo -n $"Shutting down Etud: " 
  killall Etud 
- [ [ "$?" -eq 0 ] && echo_success || echo_failure 
+ [ "$?" -eq 0 ] && echo_success || echo_failure 
  echo 
 
  case $1 in 
  start)