service routine fixes
[grml-shlib.git] / sh-lib
diff --git a/sh-lib b/sh-lib
index 84d45e0..e68951c 100644 (file)
--- a/sh-lib
+++ b/sh-lib
@@ -306,6 +306,16 @@ function checkRoot
   checkId 0 "$1" "$2"
 }
 
+function isGrml
+{
+  if [ -f /etc/grml_version ] ; then 
+    dprint "isGrml(): this seems to be a grml system"
+    return 0                       
+  else                               
+    dprint "isGrml(): this is not a grml system"
+    return 1                       
+  fi                                 
+}
 
 function runsFromHd
 {
@@ -545,7 +555,7 @@ function netGetNameservers
   fi
   
   setCLang
-  ns_=`awk '/^nameserver/{printf "%s ",$2}' $file_`
+  ns_=`awk '/^nameserver/{printf "%s ",$2}' $file_ |xargs echo`
   restoreLang
   if [ -z "$ns_" ]; then
     if [ -z "$message_" ]; then
@@ -608,9 +618,10 @@ function _touchService
 
 function _createServiceFunctions
 {
-  for i in "start" "stop" "restart" "reload" "force-reload"; do
+  for i in "start" "stop" "restart" "reload"; do
     eval "function ${i}Service { _touchService ${i} \"\$1\" \"\$2\" \"\$3\"; }"
   done
+  eval "function forceReloadService { _touchService force-reload \"\$1\" \"\$2\" \"\$3\"; }"
 }
 _createServiceFunctions
 # }}}
@@ -703,7 +714,7 @@ function _setDebugLevel
   local debug_="${DEBUG:-0}"
   VERBOSE__="$debug_"
 }
-_checkBootParam
+_setDebugLevel
 # }}}
 
 # END OF FILE