From 5381ceabaeaabac9b2065a31c73d0d9357352483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sh=C3=ACw=C4=93i=20nguyen?= <84650617+HuskyDG@users.noreply.github.com> Date: Sun, 9 Jul 2023 16:01:00 +0700 Subject: [PATCH] ksud: symlink by relative path when handle partitions (#737) This allows the Magisk design-compliant module boot script to access `$MODDIR/system/$part` while the mounted overlay still points to `/$part` Fix https://github.com/tiann/KernelSU/issues/726 --- userspace/ksud/src/installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userspace/ksud/src/installer.sh b/userspace/ksud/src/installer.sh index 2d23d679..07d740e4 100644 --- a/userspace/ksud/src/installer.sh +++ b/userspace/ksud/src/installer.sh @@ -313,7 +313,7 @@ handle_partition() { ui_print "- Handle partition /$1" # we create a symlink if module want to access $MODPATH/system/$1 # but it doesn't always work(ie. write it in post-fs-data.sh would fail because it is readonly) - mv -f $MODPATH/system/$1 $MODPATH/$1 && ln -sf /$1 $MODPATH/system/$1 + mv -f $MODPATH/system/$1 $MODPATH/$1 && ln -sf ../$1 $MODPATH/system/$1 fi }