@@ -216,11 +216,13 @@ do_install () {
# shell based configuration loader allows to place code snippets into this folder
install -d ${D}${libdir}/swupdate/conf.d
install -m 755 ${WORKDIR}/swupdate.sh ${D}${libdir}/swupdate
+ sed -i 's#@LIBDIR@#${libdir}#g' ${D}${libdir}/swupdate/swupdate.sh
if ${SWUPDATE_MONGOOSE}; then
install -m 644 ${WORKDIR}/10-mongoose-args ${D}${libdir}/swupdate/conf.d/
fi
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/swupdate.service ${D}${systemd_system_unitdir}
+ sed -i 's#@LIBDIR@#${libdir}#' ${D}${systemd_system_unitdir}/swupdate.service
install -m 644 ${WORKDIR}/swupdate.socket.tmpl ${D}${systemd_system_unitdir}/swupdate.socket
sed -e "s,@@SWUPDATE_SOCKET_CTRL_PATH@@,${SWUPDATE_SOCKET_CTRL_PATH},g" \
-e "s,@@SWUPDATE_SOCKET_PROGRESS_PATH@@,${SWUPDATE_SOCKET_PROGRESS_PATH},g" \
@@ -4,7 +4,7 @@ Documentation=https://github.com/sbabic/swupdate
Documentation=https://sbabic.github.io/swupdate
[Service]
-ExecStart=/usr/lib/swupdate/swupdate.sh
+ExecStart=@LIBDIR@/swupdate/swupdate.sh
KillMode=mixed
[Install]
@@ -8,11 +8,11 @@ SWUPDATE_SURICATTA_ARGS=""
# source all files from /etc/swupdate/conf.d and /usr/lib/swupdate/conf.d/
# A file found in /etc replaces the same file in /usr
-for f in `(test -d /usr/lib/swupdate/conf.d/ && ls -1 /usr/lib/swupdate/conf.d/; test -d /etc/swupdate/conf.d && ls -1 /etc/swupdate/conf.d) | sort -u`; do
+for f in `(test -d @LIBDIR@/swupdate/conf.d/ && ls -1 @LIBDIR@/swupdate/conf.d/; test -d /etc/swupdate/conf.d && ls -1 /etc/swupdate/conf.d) | sort -u`; do
if [ -f /etc/swupdate/conf.d/$f ]; then
. /etc/swupdate/conf.d/$f
else
- . /usr/lib/swupdate/conf.d/$f
+ . @LIBDIR@/swupdate/conf.d/$f
fi
done
In case of multilib, swupdate.sh is put on /usr/lib64 instead of /usr/lib. Replace the path during the install. Signed-off-by: Stefano Babic <sbabic@denx.de> --- recipes-support/swupdate/swupdate.inc | 2 ++ recipes-support/swupdate/swupdate/swupdate.service | 2 +- recipes-support/swupdate/swupdate/swupdate.sh | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-)