Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2022-01-03 22:28:08 +0200
committernl6720 <nl6720@gmail.com>2022-01-03 22:43:22 +0200
commit57a8d9bb182295a3f83be2e06148c94261385dff (patch)
treefd6ca665244e5638a2dd2d48325ef040f3494fda /hooks
parenta4c9d8c3aa25fce0d1fb98be4150ebd25ec99e4b (diff)
hooks/archiso: mount cow_device read-only at first and remount it read-write right after
This prevents errors when the device is already mounted read-only somewhere else (e.g. if cow_device and archisodevice are the same). Partially reverts d0d7eb25cf503753cb1452756059a281289e7a41 Fixes #9.
Diffstat (limited to 'hooks')
-rw-r--r--hooks/archiso5
1 files changed, 4 insertions, 1 deletions
diff --git a/hooks/archiso b/hooks/archiso
index 59c5765..7e40077 100644
--- a/hooks/archiso
+++ b/hooks/archiso
@@ -244,7 +244,10 @@ archiso_mount_handler() {
fi
if [ -n "${cow_device}" ]; then
- _mnt_dev "${cow_device}" "/run/archiso/cowspace" "-w" "${cow_flags}"
+ # Mount cow_device read-only at first and remount it read-write right after. This prevents errors when the
+ # device is already mounted read-only somewhere else (e.g. if cow_device and archisodevice are the same).
+ _mnt_dev "${cow_device}" "/run/archiso/cowspace" "-r" "${cow_flags}"
+ mount -o remount,rw "/run/archiso/cowspace"
else
msg ":: Mounting /run/archiso/cowspace (tmpfs) filesystem, size=${cow_spacesize}..."
mkdir -p /run/archiso/cowspace