Rev 412: log dates/time in event startup messages in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Fri Jun 1 05:23:16 GMT 2007


------------------------------------------------------------
revno: 412
revision-id: tridge at samba.org-20070601052316-xw1xo5fx9hxgdjl9
parent: tridge at samba.org-20070601035018-iqs91hrut48yk8jg
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Fri 2007-06-01 15:23:16 +1000
message:
  log dates/time in event startup messages
modified:
  tools/events                   events-20070529030121-04fjh63cxfh8v1pj-1
=== modified file 'tools/events'
--- a/tools/events	2007-06-01 03:50:18 +0000
+++ b/tools/events	2007-06-01 05:23:16 +0000
@@ -11,7 +11,7 @@
 	# wait for local services to come up.
 	[ -z "$CTDB_WAIT_TCP_PORTS" ] || {
 	  all_ok=0
-	  echo "Waiting for local tcp ports $CTDB_WAIT_TCP_PORTS"
+	  echo "`/bin/date` Waiting for local tcp ports $CTDB_WAIT_TCP_PORTS"
 	  while [ $all_ok -eq 0 ]; do
 	  	  all_ok=1
 	  	  for p in $CTDB_WAIT_TCP_PORTS; do
@@ -23,12 +23,12 @@
 			exit 1
 		  }
           done
-	  echo "Local tcp services are up"
+	  echo "`/bin/date` Local tcp services are up"
 	}
 	# wait for local directories to becomes available (could be slow to mount)
 	[ -z "$CTDB_WAIT_DIRECTORIES" ] || {
 	  all_ok=0
-	  echo "Waiting for local directories $CTDB_WAIT_DIRECTORIES"
+	  echo "`/bin/date` Waiting for local directories $CTDB_WAIT_DIRECTORIES"
 	  while [ $all_ok -eq 0 ]; do
 	  	  all_ok=1
 	  	  for d in $CTDB_WAIT_DIRECTORIES; do
@@ -40,7 +40,7 @@
 			exit 1
 		  }
           done
-	  echo "Local directories are available"
+	  echo "`/bin/date` Local directories are available"
 	}
 	exit 0;	
 	;;
@@ -55,7 +55,7 @@
 	maskbits=$3
 
 	/sbin/ip addr add $ip/$maskbits dev $iface || {
-		 echo "Failed to add $ip/$maskbits on dev $iface"
+		 echo "`/bin/date` Failed to add $ip/$maskbits on dev $iface"
 		 exit 1
 	}
 	echo $ip >> /etc/ctdb/taken_ips
@@ -72,14 +72,14 @@
 
      releaseip)
 	if [ $# != 3 ]; then
-	   echo "must supply interface, IP and maskbits"
+	   echo "`/bin/date` must supply interface, IP and maskbits"
 	   exit 1
 	fi
 	iface=$1
 	ip=$2
 	maskbits=$3
 	/sbin/ip addr del $ip dev $iface || {
-		 echo "Failed to del $ip on dev $iface"
+		 echo "`/bin/date` Failed to del $ip on dev $iface"
 		 exit 1
 	}
 	# if we have a local arp entry for this IP then remove it
@@ -115,5 +115,5 @@
 	;;
 esac
 
-echo "Invalid command $cmd"
+echo "`/bin/date` Invalid command $cmd"
 exit 1



More information about the samba-cvs mailing list