Skip to content

Commit

Permalink
Update post-fs-data.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Zenlua authored Jan 9, 2024
1 parent c8e0369 commit 45911ed
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions module/common/post-fs-data.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# kakathic
MODP="${0%/*}"
magisk && PMSK="$(magisk --path)/.magisk/mirror"
magisk && su="su -M -c"

# start overlay_fs
for TV in $(cat $MODP/partition); do
[ -e $MODP/zption/chcon ] && chcon -Rh "$(ls -Z -d $TV | awk '{print $1}')" $MODP$TV
[ -e $MODP/zption/chmod ] && chmod -R 755 $MODP$TV
[ -e $MODP/zption/chown ] && chown -Rh 0:0 $MODP$TV
[ -e $MODP/zption/rw ] && $su mount -t overlay kakathic -o ro,upperdir=$MODP$TV,lowerdir=$TV,workdir=$MODP/zption/tmp1$TV $TV || $su mount -t overlay kakathic -o lowerdir=$MODP$TV:$TV $TV
[ -e $MODP/zption/rw ] && $su mount -t overlay kakathic -o upperdir=$MODP$TV,lowerdir=$PMSK$TV,workdir=$MODP/zption/tmp2$TV $PMSK$TV || $su mount -t overlay kakathic -o lowerdir=$MODP$TV:$PMSK$TV $PMSK$TV
[ -e $MODP/zption/chown ] && chown -Rh 0:0 $MODP$TV
if [ -e $MODP/zption/rw ];then
mount -t overlay kakathic -o upperdir=$MODP$TV,lowerdir=$TV,workdir=$MODP/zption/tmp1$TV $TV
magisk && mount -t overlay kakathic -o upperdir=$MODP$TV,lowerdir=$PMSK$TV,workdir=$MODP/zption/tmp2$TV $PMSK$TV
else
mount -t overlay kakathic -o lowerdir=$MODP$TV:$TV $TV
magisk && mount -t overlay kakathic -o lowerdir=$MODP$TV:$PMSK$TV $PMSK$TV
fi
done
# end overlay_fs

0 comments on commit 45911ed

Please sign in to comment.