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 f3a3094 commit 1db5c19
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion module/common/post-fs-data.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# kakathic
MODPATH="${0%/*}"
MODP="${0%/*}"
PMSK="$(magisk --path)/.magisk/mirror"
su="su -M -c"
# start overlay_fs
for TV in $(cat $MODP/partition); do
if [ -e "$TV" ];then
[ -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 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
fi
done
# end overlay_fs

0 comments on commit 1db5c19

Please sign in to comment.