[Lunar-commits] <lunar-tools> Correctly check for systemd not installed.

Peter de Ridder peter at lunar-linux.org
Fri Aug 31 23:17:17 CEST 2012


commit 4e31635fedb2c129fc676f7608bfe4dfd6c52dfa
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Fri, 31 Aug 2012 14:17:17 -0700
URL: https://github.com/lunar-linux/lunar-tools/commit/4e31635fedb2c129fc676f7608bfe4dfd6c52dfa

Correctly check for systemd not installed.

test -n succeeds on a non existing variable.
---
  prog/lnet                                                    +1/-1     
  prog/lservices                                               +1/-1     
  2 files changed, 2 insertions (+), 2 deletions (-)

--- a/prog/lnet
+++ b/prog/lnet
@@ -271,7 +271,7 @@ function ethernet_menu() {
       M)      ethernet_manage_device $1;;
       D)
         if confirm "Are you sure you wish to delete $1?" "--defaultno"; then
-          if [ -n $SYSTEMDUNITDIR ]; then
+          if [ -n "$SYSTEMDUNITDIR" ]; then
             systemd_disable_existing ${1}
           fi
           rm -f "$CONFIG_DIR/$1"
--- a/prog/lservices
+++ b/prog/lservices
@@ -205,7 +205,7 @@ main_menu() {
   if [ $? != 0 ] ; then
     return
   fi
-  if [ -n $SYSTEMDUNITDIR ]; then
+  if [ -n "$SYSTEMDUNITDIR" ]; then
     service_menu_systemd $(echo $action | sed 's/ //g')
   else
     service_menu $(echo $action | sed 's/ //g')




More information about the Lunar-commits mailing list