The branch, master has been updated
       via  fd7bb21c4f9289fc34a57f9d8cb7c13a02d06096 (commit)
      from  702ced6c2fe569c01fe96c60d0f35a7e61506a96 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit fd7bb21c4f9289fc34a57f9d8cb7c13a02d06096
Author: Ronnie Sahlberg <[EMAIL PROTECTED]>
Date:   Wed Jul 9 10:03:21 2008 +1000

    Replace \s with [[:space:]] in our regexps we use for egrep.
    
    Kevin Collins noticed that RHEL5 grep-2.5.1-54.2.el5 built for
    x86 does not handle \s    while the exact same RHEL5 package for amd64
    does!
    
    [[:space:]] is more portable.  Even across the same package version ( 
different architecture ) from the same vendor :-)

-----------------------------------------------------------------------

Summary of changes:
 config/functions |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/functions b/config/functions
index 3c47e4a..f95557d 100644
--- a/config/functions
+++ b/config/functions
@@ -84,9 +84,9 @@ ctdb_wait_tcp_ports() {
              elif [ -x /usr/bin/nc ]; then
                  /usr/bin/nc -z 127.0.0.1 $p > /dev/null || all_ok=0
              elif [ -x /usr/bin/netstat ]; then
-                 (netstat -a -n | egrep "0.0.0.0:$p\s*LISTEN" > /dev/null) || 
all_ok=0
+                 (netstat -a -n | egrep "0.0.0.0:$p[[:space:]]*LISTEN" > 
/dev/null) || all_ok=0
              elif [ -x /bin/netstat ]; then
-                 (netstat -a -n | egrep "0.0.0.0:$p\s*LISTEN" > /dev/null) || 
all_ok=0
+                 (netstat -a -n | egrep "0.0.0.0:$p[[:space:]]*LISTEN" > 
/dev/null) || all_ok=0
              else 
                  echo "No tool to check tcp ports availabe. can not check in 
ctdb_wait_tcp_ports"
                  return
@@ -211,7 +211,7 @@ kill_tcp_connections() {
 
     _killcount=0
     connfile="$CTDB_BASE/state/connections.$_IP"
-    netstat -tn |egrep "^tcp.*\s+$_IP:.*ESTABLISHED" | awk '{print $4" "$5}' > 
$connfile
+    netstat -tn |egrep "^tcp.*[[:space:]]+$_IP:.*ESTABLISHED" | awk '{print 
$4" "$5}' > $connfile
     while read dest src; do
        srcip=`echo $src | cut -d: -f1`
        srcport=`echo $src | cut -d: -f2`
@@ -230,7 +230,7 @@ kill_tcp_connections() {
        return;
     }
     _count=0
-    while netstat -tn |egrep "^tcp.*\s+$_IP:.*ESTABLISHED" > /dev/null; do
+    while netstat -tn |egrep "^tcp.*[[:space:]]+$_IP:.*ESTABLISHED" > 
/dev/null; do
        sleep 1
        _count=`expr $_count + 1`
        [ $_count -gt 3 ] && {


-- 
CTDB repository

Reply via email to