From 97dabbe98808d2487423186cfb657886167cc12e Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Sat, 13 Jul 2019 01:01:19 +0300 Subject: [PATCH] add post-installation script for generating machine-id --- packages/dbus/build.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/dbus/build.sh b/packages/dbus/build.sh index de580a44a..2c76c14f0 100644 --- a/packages/dbus/build.sh +++ b/packages/dbus/build.sh @@ -13,3 +13,14 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-libaudit --disable-systemd LIBS=-llog termux_step_pre_configure() { autoconf -i } + +termux_step_create_debscripts() { + { + echo "#!${TERMUX_PREFIX}/bin/sh" + echo "if [ ! -e ${TERMUX_PREFIX}/var/lib/dbus/machine-id ]; then" + echo "mkdir -p ${TERMUX_PREFIX}/var/lib/dbus" + echo "dbus-uuidgen > ${TERMUX_PREFIX}/var/lib/dbus/machine-id" + echo "fi" + echo "exit 0" + } > postinst +}