Skip to content

Commit

Permalink
Fix selinux for vtoycow in CreatePersistentImg.sh
Browse files Browse the repository at this point in the history
Label the overlayfs root directory in vtoycow imgs with the appropriate selinux context type to enable booting without disabling selinux.
  • Loading branch information
0xF4CED committed Nov 10, 2023
1 parent 39703ca commit 57a7b23
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions INSTALL/CreatePersistentImg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,19 @@ mkfs -t $fstype $fsopt -L $label $freeloop

sync

if [ -n "$config" ]; then
if [ -n "$config" ] || [ "$label" = "vtoycow" ]; then
if [ -d ./persist_tmp_mnt ]; then
rm -rf ./persist_tmp_mnt
fi

mkdir ./persist_tmp_mnt
if mount $freeloop ./persist_tmp_mnt; then
echo '/ union' > ./persist_tmp_mnt/$config
if [ -n "$config" ]; then
echo '/ union' > ./persist_tmp_mnt/$config
elif [ "$label" = "vtoycow" ]; then
mkdir -p ./persist_tmp_mnt/vtoyoverlayfs/overlayfs/
chcon -t root_t ./persist_tmp_mnt/vtoyoverlayfs/overlayfs
fi
sync
umount ./persist_tmp_mnt
fi
Expand Down

0 comments on commit 57a7b23

Please sign in to comment.