[Lunar-commits] <lunar-tools> lservices: Silence error output from is-active if unit file isn't enabled

Stefan Wold ratler at lunar-linux.org
Sat Sep 1 13:29:01 CEST 2012


commit 51d7e5a194b914aa94d7f209155f2ffbeac445b6
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Sat, 01 Sep 2012 04:29:01 -0700
URL: https://github.com/lunar-linux/lunar-tools/commit/51d7e5a194b914aa94d7f209155f2ffbeac445b6

lservices: Silence error output from is-active if unit file isn't enabled
---
  prog/lservices                                               +2/-2     
  1 files changed, 2 insertions (+), 2 deletions (-)

--- a/prog/lservices
+++ b/prog/lservices
@@ -123,7 +123,7 @@ service_menu_systemd() {(
   #  add       add the service to the startup sequence (currently removed)
 
   while true ; do
-    if systemctl -q is-active $1 ; then
+    if systemctl -q is-active $1 2> /dev/null; then
       TI1="stop"
       OP1="stop the service (currently started)"
     else
@@ -178,7 +178,7 @@ list_systemd_services() {(
     else
       FLAG="-"
     fi
-    if systemctl -q is-active $SERVICE; then
+    if systemctl -q is-active $SERVICE 2> /dev/null; then
       FLAG+="1"
     else
       FLAG+="0"




More information about the Lunar-commits mailing list