Skip to content

Commit

Permalink
Fixed service restart on modmanager enable call when already enabled,…
Browse files Browse the repository at this point in the history
… changed tweak-enable-debug-menu arch to target goggles only
  • Loading branch information
j005u committed Sep 19, 2022
1 parent d0a1729 commit 37307a7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ipk/control/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: wtfos-modloader
Version: 0.1.3
Version: 0.1.4
Maintainer: Joonas Trussmann <[email protected]>
Description: Configurable LD_PRELOAD injector for DJI services
Architecture: armv7-3.2
Expand Down
5 changes: 4 additions & 1 deletion modloader
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ then
done <<< "$(find /opt/etc/preload.d/${me}/ -name \"*.so\" -maxdepth 1 -type l)"
fi
if [ ! -z "${MODS}" ]
if [ ! -z "${MODS}" ] || [ ! -z "${LD_PRELOAD}" ]
then
#clear LD_PRELOAD in application env so spawns don't get spammed
MODS="${MODS##*( )} /opt/lib/libmodloader_final.so"
if [ ! -z "${LD_PRELOAD}" ]; then
MODS="${LD_PRELOAD} ${MODS} /opt/lib/libmodloader_final.so"
fi
echo "modloader starting with: ${MODS}"
LD_PRELOAD="${MODS}" ${me}_original "$@"
else
Expand Down
4 changes: 4 additions & 0 deletions modmanager
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ if [ $1 = "enable" ]; then
mkdir -p "${PRELOAD_D}${target}"
fi

if [[ -f "${PRELOAD_D}${target}/${modlib}" ]]; then
exit 0
fi

ln -sf "${PRELOAD_D}${modlib}" "${PRELOAD_D}${target}/${modlib}"

#this will force init to reload the service, which should auto enable it
Expand Down
4 changes: 2 additions & 2 deletions tweak-enable-debug-menu/ipk/control/control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tweak-enable-debug-menu
Version: 0.1.4
Version: 0.1.5
Maintainer: Joonas Trussmann <[email protected]>
Description: Enable DJI debug menu on Goggles
Architecture: armv7-3.2
Architecture: pigeon-glasses
Depends: wtfos-modloader

0 comments on commit 37307a7

Please sign in to comment.