[Lunar-commits] <moonbase-core> Merge branch 'systemd_plugin_fix'

v4hn me at v4hn.de
Tue Oct 8 01:23:53 CEST 2013


commit 7aabf793a55cb421c1db2b9a58b4f8764d3a6250
Author: v4hn <me at v4hn.de>
Date: Mon, 07 Oct 2013 16:23:35 -0700
URL: https://github.com/lunar-linux/moonbase-core/commit/7aabf793a55cb421c1db2b9a58b4f8764d3a6250

Merge branch 'systemd_plugin_fix'

Solves the problem at hand
---
  system/systemd/plugin.d/systemd.plugin | +17/-5    
  1 file changed, 17 insertions(+), 5 deletions(-)

--- a/system/systemd/plugin.d/systemd.plugin
+++ b/system/systemd/plugin.d/systemd.plugin
@@ -71,7 +71,7 @@ plugin_systemd_configure()
 }
 
 
-plugin_systemd_post_install()
+plugin_systemd_post_build()
 {
   local SERVICES SERVICE SYSTEMDUNITDIR
   debug_msg "plugin_systemd_post_install ($@)"
@@ -101,17 +101,28 @@ plugin_systemd_post_install()
     invoke_installwatch
     systemctl -q enable $SERVICE
     devoke_installwatch
+  done
+
+  return 2
+}
+
+plugin_systemd_restart_services() {
+  local SERVICE
+  debug_msg "plugin_systemd_restart_services ($@)"
 
-    # start-or-restart it
+  # start-or-restart it
+  for SERVICE in $SYSTEMD_SERVICES; do
+    if echo $SERVICE | grep -q ^-; then
+      continue;
+    fi
     if [ "${LUNAR_RESTART_SERVICES:=on}" == "on" ]; then
       systemctl restart $SERVICE
     fi
-
   done
+
   return 2
 }
 
-
 plugin_systemd_tmpfilesd_post_build() {
   local FILE SYSTEMDTEMPFILES
   debug_msg "plugin_systemd_tmpfilesd_post_build ($@)"
@@ -148,6 +159,7 @@ plugin_systemd_disable_services_pre_remove() {
 }
 
 plugin_register BUILD_CONFIGURE plugin_systemd_configure
-plugin_register BUILD_POST_INSTALL plugin_systemd_post_install
+plugin_register BUILD_POST_BUILD plugin_systemd_post_build
 plugin_register BUILD_POST_BUILD plugin_systemd_tmpfilesd_post_build
+plugin_register BUILD_POST_INSTALL plugin_systemd_restart_services
 plugin_register BUILD_PRE_REMOVE plugin_systemd_disable_services_pre_remove




More information about the Lunar-commits mailing list