Skip to content

Commit

Permalink
Update overlayrw
Browse files Browse the repository at this point in the history
  • Loading branch information
Zenlua authored Jan 25, 2024
1 parent 91b09ed commit c421023
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,15 +3,15 @@ MODP="/data/overlayfs"
TMPP="/data/overlayfs/tmp"
if [ "$1" == "-ro" ];then
mkdir -p "$MODP$2"
#setfattr -n trusted.overlay.opaque -v y $MODP$2 2>/dev/null
setfattr -n trusted.overlay.opaque -v y $MODP$2 2>/dev/null
chcon -Rh "$(ls -nZld "$2" | awk '{print $5}')" "$MODP$2"
chmod -R 755 "$MODP$2"
chown -Rh $(ls -nZld "$2" | awk '{print $3":"$4}') "$MODP$2"
mount -t overlay kakathic -o "lowerdir=$MODP$2:$2" "$2" && echo "Mount RO: $2 done"
[ "$(grep -cm1 "$2" /data/overlayfs/tmp/partition)" == 1 ] || echo "$2" >> /data/overlayfs/tmp/partition
elif [ -d "$1" ];then
mkdir -p "$MODP$1"
#setfattr -n trusted.overlay.opaque -v y $MODP$1 2>/dev/null
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"
Expand Down

0 comments on commit c421023

Please sign in to comment.