[PATCH] Slackware init script fixes



Attached are two patches for the Slackware init script

0001: Remove HAL requirement in rc.networkmanger
0002: Add a "sleep 2" in the restart() function

-RW

From e55d67e40e8f3aaa6f2816b74f74bca33d99a831 Mon Sep 17 00:00:00 2001
From: Robby Workman <rworkman slackware com>
Date: Wed, 22 Dec 2010 08:51:30 -0600
Subject: [PATCH 1/2] initscript/Slackware/rc.networkmanager.in: Remove HAL requirement

NM no longer requires HAL to work, so let's remove that from the
provide init script for Slackware
---
 initscript/Slackware/rc.networkmanager.in |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/initscript/Slackware/rc.networkmanager.in b/initscript/Slackware/rc.networkmanager.in
index 0489038..35c42a4 100644
--- a/initscript/Slackware/rc.networkmanager.in
+++ b/initscript/Slackware/rc.networkmanager.in
@@ -27,11 +27,6 @@ nm_start()
     return
 	fi
   
-	if [ "`pgrep hald`" = "" ]; then
-	 echo "HAL must be running to start NetworkManager"
-	 return
-	fi
- 
   # Just in case the pidfile is still there, we may need to nuke it.
   if [ -e "$PIDFILE" ]; then
     rm -f $PIDFILE
-- 
1.7.3.4

From faf8237b11e148095a66b6b837b0d822831e3fe1 Mon Sep 17 00:00:00 2001
From: Robby Workman <rworkman slackware com>
Date: Wed, 22 Dec 2010 08:52:29 -0600
Subject: [PATCH 2/2] initscript/Slackware/rc.networkmanager.in: Add sleep in restart()

The restart() function almost never works here - perhaps some part
of NM takes a bit too long to stop() and then blocks the start()
operation - but "sleep 2" between them makes everything fine.
---
 initscript/Slackware/rc.networkmanager.in |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/initscript/Slackware/rc.networkmanager.in b/initscript/Slackware/rc.networkmanager.in
index 35c42a4..6eed87e 100644
--- a/initscript/Slackware/rc.networkmanager.in
+++ b/initscript/Slackware/rc.networkmanager.in
@@ -62,6 +62,7 @@ nm_stop()
 nm_restart()
 {
   nm_stop
+  sleep 2
   nm_start
 }
 
-- 
1.7.3.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]