summaryrefslogtreecommitdiffstats
path: root/remote/modules/systemd/systemd.build
diff options
context:
space:
mode:
authorSimon Rettberg2013-06-21 16:48:52 +0200
committerSimon Rettberg2013-06-21 16:48:52 +0200
commit09ae103410f6ff67690ef7db869a6874f05e8b13 (patch)
tree8dbcec18e90c9f3cc9dc4ef0b5d9b5a162dd273c /remote/modules/systemd/systemd.build
parent[redsocks] Don't block systemd target until job is complete (diff)
downloadtm-scripts-09ae103410f6ff67690ef7db869a6874f05e8b13.tar.gz
tm-scripts-09ae103410f6ff67690ef7db869a6874f05e8b13.tar.xz
tm-scripts-09ae103410f6ff67690ef7db869a6874f05e8b13.zip
[systemd] Remove dependencies of deleted units
Diffstat (limited to 'remote/modules/systemd/systemd.build')
-rw-r--r--remote/modules/systemd/systemd.build6
1 files changed, 5 insertions, 1 deletions
diff --git a/remote/modules/systemd/systemd.build b/remote/modules/systemd/systemd.build
index 8f4081e3..8052ca4e 100644
--- a/remote/modules/systemd/systemd.build
+++ b/remote/modules/systemd/systemd.build
@@ -30,8 +30,12 @@ build () {
# Delete unneeded services
pinfo "Deleting unneeded services"
local SERVICE=
+ local OTHER=
for SERVICE in $REQUIRED_DISABLED_SERVICES; do
- find "${MODULE_BUILD_DIR}" -name "$SERVICE" -delete
+ find "${MODULE_BUILD_DIR}" -name "$SERVICE" -exec rm -r {} \;
+ for OTHER in $(grep -l -r "$SERVICE" "$MODULE_BUILD_DIR/usr/lib/systemd/system"); do
+ sed -i -r "s#\s*$SERVICE\s*# #g" "$OTHER"
+ done
done
}