[omd-commits] OMD Git: omd: apache-omd: fix a bug in init-script. /proc/

git version control git at mathias-kettner.de
Sat Sep 26 21:24:42 CEST 2015


 uptime is not necessarily float
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Module:   omd
Branch:   master
Commit:   7706cffc4ad461ab2f74af3fe23752f59f9a3cd1
URL:      http://omdistro.org/projects/omd/repository/revisions/7706cffc4ad461ab2f74af3fe23752f59f9a3cd1

Author:   Gerhard Lausser <gerhard.lausser at consol.de>
Date:     Sat Sep 26 21:24:34 2015 +0200
Commiter: Gerhard Lausser <gerhard.lausser at consol.de>
Date:     Sat Sep 26 21:24:34 2015 +0200

apache-omd: fix a bug in init-script. /proc/uptime is not necessarily float

---

 packages/apache-omd/skel/etc/init.d/apache |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/apache-omd/skel/etc/init.d/apache b/packages/apache-omd/skel/etc/init.d/apache
index 935c4b0..c5b3b7f 100644
--- a/packages/apache-omd/skel/etc/init.d/apache
+++ b/packages/apache-omd/skel/etc/init.d/apache
@@ -84,7 +84,7 @@ apache_wait_start() {
 
   # (nearly) reproducible problems with apache at boot-time. (alloc_listener: failed to set up sockaddr for 127.0.0.1)
   # With this ping the problem disappears.
-  test -f /etc/debian_version && test $(cut -f1 -d"." /proc/uptime) -lt 300 && ping -nqc 10 $CONFIG_APACHE_TCP_ADDR >/dev/null 2>&1
+  test -f /etc/debian_version && test $(cut -f1 -d" " /proc/uptime | cut -f1 -d".") -lt 300 && ping -nqc 10 $CONFIG_APACHE_TCP_ADDR >/dev/null 2>&1
   $APACHE_BIN -f "$CONFIG_FILE"
   
   i=0



More information about the omd-commits mailing list