Skip to content

Commit

Permalink
Update overlayrw
Browse files Browse the repository at this point in the history
  • Loading branch information
Zenlua authored Jan 20, 2024
1 parent 716ae50 commit 2ef834e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/common/overlayrw
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ MODP="/data/overlayfs"
TMPP="/data/overlayfs/tmp"
if [ -d $1 ];then
mkdir -p $MODP$1
setfattr -n trusted.overlay.opaque -v y $MODP$1 2>/dev/null
/data/overlayfs/tmp/toybox setfattr -n trusted.overlay.opaque -v y $MODP$1 2>/dev/null
mkdir -p $TMPP$1
chcon -Rh "$(ls -nZld "$1" | awk '{print $5}')" "$MODP$1"
chmod -R 755 "$MODP$1"
chown -Rh $(ls -nZld "$1" | awk '{print $3":"$4}') "$MODP$1"
mount -t overlay kakathic -o upperdir=$MODP$1,lowerdir=$1,workdir=$TMPP$1 $1 && echo "Mount: $1 done" || echo "Mount: $1 failure !"
/data/overlayfs/tmp/toybox mount -t overlay kakathic -o upperdir=$MODP$1,lowerdir=$1,workdir=$TMPP$1 $1 && echo "Mount: $1 done" || echo "Mount: $1 failure !"
elif [ -z "$1" ] || [ "$1" == "--help" ];then
echo "Use: overlayrw [path_folder_rw]"
echo
Expand Down

0 comments on commit 2ef834e

Please sign in to comment.