summaryrefslogtreecommitdiffstats
path: root/remote/modules/systemd/module.build
diff options
context:
space:
mode:
authorJonathan Bauer2014-04-14 16:11:26 +0200
committerJonathan Bauer2014-04-14 16:11:26 +0200
commit6d8ae90844e2c82226e895fc767078f2beeaefd1 (patch)
tree7e6a5ae728856f7984cb80fd5e37f66a0cd3c83b /remote/modules/systemd/module.build
parent[systemd] forgot '-i' for sed (diff)
downloadtm-scripts-6d8ae90844e2c82226e895fc767078f2beeaefd1.tar.gz
tm-scripts-6d8ae90844e2c82226e895fc767078f2beeaefd1.tar.xz
tm-scripts-6d8ae90844e2c82226e895fc767078f2beeaefd1.zip
[systemd] fixes for the patch apply logic...
Diffstat (limited to 'remote/modules/systemd/module.build')
-rw-r--r--remote/modules/systemd/module.build13
1 files changed, 8 insertions, 5 deletions
diff --git a/remote/modules/systemd/module.build b/remote/modules/systemd/module.build
index 70ddfcc5..2c27231e 100644
--- a/remote/modules/systemd/module.build
+++ b/remote/modules/systemd/module.build
@@ -7,14 +7,17 @@ fetch_source () {
# starting with systemd 212 a new way of setting global environment is supported
# meaning we don't have to apply the patch needed til that version.
if [ "x${REQUIRED_VERSION#systemd-}" = "x212" ]; then
+ pinfo "Systemd version 212 detected."
+ pinfo "REQUIRED_XATTR_PATCH is $REQUIRED_XATTR_PATCH"
# patch src/core/socket.c if activated in the config file
- if [ "$REQUIRED_XATTR_PATCH" = "xyes" ]; then
+ if [ "x$REQUIRED_XATTR_PATCH" = "xyes" ]; then
+ pinfo "Patching 'src/core/socket.c' ..."
# patch it
- if [ -e "src/core/socket.c" ]; then
- sed -i 's/^#include <attr\/xattr.h>$/#include <sys\/xattr.h>\n#include <attr\/xattr.h>/g' src/core/socket.c \
- || perror "Could not patch '$(pwd)/src/core/socket.c'"
+ if [ -e "src/$REQUIRED_VERSION/src/core/socket.c" ]; then
+ sed -i 's/^#include <attr\/xattr.h>$/#include <sys\/xattr.h>\n#include <attr\/xattr.h>/g' "src/$REQUIRED_VERSION/src/core/socket.c" \
+ || perror "Could not patch 'src/$REQUIRED_VERSION/src/core/socket.c'"
else
- perror "'$(pwd)/src/core/socket.c' does not exist."
+ perror "'src/$REQUIRED_VERSION//src/core/socket.c' does not exist."
fi
fi
else