[Lunar-commits] <moonbase-core> systemd: add some >/dev/null's to the plugin
v4hn
me at v4hn.de
Thu Sep 19 22:06:42 CEST 2013
commit fcee12a7b55e76b2fb9ee4eca81981c4d1ee7ca0
Author: v4hn <me at v4hn.de>
Date: Sun, 15 Sep 2013 07:15:16 -0700
URL: https://github.com/lunar-linux/moonbase-core/commit/fcee12a7b55e76b2fb9ee4eca81981c4d1ee7ca0
systemd: add some >/dev/null's to the plugin
The is-enabled produced an error message for each
system.d file of an previously uninstalled module on lin.
---
system/systemd/plugin.d/systemd.plugin | +5/-5
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/system/systemd/plugin.d/systemd.plugin
+++ b/system/systemd/plugin.d/systemd.plugin
@@ -27,7 +27,7 @@ plugin_systemd_configure()
# don't ask for '@' services - these should always be installed but
# never linked directly. Also ask for new or renamed services.
if echo $SERVICE | grep -q @ || echo $SYSTEMD_SERVICES | egrep -q "(^| )-?$SERVICE( |$)"; then
- if systemctl -q is-enabled $SERVICE ; then
+ if systemctl -q is-enabled $SERVICE &> /dev/null ; then
SYSTEMD_SERVICES=$(echo $SYSTEMD_SERVICES | sed -r "s;(^| )-?($SERVICE)( |$);\1\2\3;")
else
SYSTEMD_SERVICES=$(echo $SYSTEMD_SERVICES | sed -r "s;(^| )-?($SERVICE)( |$);\1-\2\3;")
@@ -41,8 +41,8 @@ plugin_systemd_configure()
else
SYSTEMD_SERVICES+=" -$SERVICE"
# ignore output here - this is likely to hit "not found" errors
- systemctl disable $SERVICE > /dev/null 2>&1
- systemctl stop $SERVICE > /dev/null 2>&1
+ systemctl disable $SERVICE &> /dev/null
+ systemctl stop $SERVICE &> /dev/null
fi
done
cd $SCRIPT_DIRECTORY
@@ -91,13 +91,13 @@ plugin_systemd_post_build()
devoke_installwatch
fi
- systemctl daemon-reload > /dev/null 2>&1
+ systemctl daemon-reload &> /dev/null
for SERVICE in $SYSTEMD_SERVICES; do
if echo $SERVICE | grep -q ^-; then
continue;
fi
- systemctl disable $SERVICE
+ systemctl disable $SERVICE &> /dev/null
invoke_installwatch
systemctl enable $SERVICE
devoke_installwatch
More information about the Lunar-commits
mailing list