[Lunar-commits] <moonbase-core> Merge branch 'systemd-plugin-track-symlinks'

v4hn me at v4hn.de
Sun Oct 27 11:21:24 CET 2013


commit 6109aedab34fea705a732ca293c4d610468809c6
Author: v4hn <me at v4hn.de>
Date: Sun, 27 Oct 2013 03:02:25 -0700
URL: https://github.com/lunar-linux/moonbase-core/commit/6109aedab34fea705a732ca293c4d610468809c6

Merge branch 'systemd-plugin-track-symlinks'
---
  system/systemd/plugin.d/systemd.plugin | +8/-2     
  1 file changed, 8 insertions(+), 2 deletions(-)

--- a/system/systemd/plugin.d/systemd.plugin
+++ b/system/systemd/plugin.d/systemd.plugin
@@ -73,7 +73,7 @@ plugin_systemd_configure()
 
 plugin_systemd_post_build()
 {
-  local SERVICES SERVICE SYSTEMDUNITDIR
+  local SERVICES SERVICE SYSTEMDUNITDIR TOUCHME
   debug_msg "plugin_systemd_post_install ($@)"
 
   local SYSTEMDUNITDIR=$(pkg-config systemd --variable=systemdsystemunitdir)
@@ -99,7 +99,13 @@ plugin_systemd_post_build()
     fi
     systemctl -q disable $SERVICE
     invoke_installwatch
-    systemctl -q enable $SERVICE
+
+    # Necessary to track enabled services with installwatch
+    # due to how systemctl creates symlinks
+    TOUCHME=$(systemctl enable $SERVICE 2>&1 | cut -d\' -f4)
+    if [ -n "$TOUCHME" ]; then
+      touch -h $TOUCHME
+    fi
     devoke_installwatch
   done
 




More information about the Lunar-commits mailing list