mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 02:48:38 -04:00
Fresh Live USBs don't report an ownership update (#840)
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
The library-ownership migration compared the owner of /mnt/persistence/wrolpi after creating it, so on a new persistence partition the root-owned directory always looked like an old library and the first-boot dialog said "Updated the library's ownership for this WROLPi version". Only re-own a library that already existed. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
22be73a1c9
commit
1e89cb55f6
1 changed files with 4 additions and 3 deletions
|
|
@ -175,15 +175,16 @@ if [ "$MODE" = "direct" ]; then
|
||||||
# script (first boot) or live-boot's initramfs (subsequent boots).
|
# script (first boot) or live-boot's initramfs (subsequent boots).
|
||||||
mkdir -p /mnt/persistence
|
mkdir -p /mnt/persistence
|
||||||
mountpoint -q /mnt/persistence || mount "$PERSIST_PART" /mnt/persistence
|
mountpoint -q /mnt/persistence || mount "$PERSIST_PART" /mnt/persistence
|
||||||
mkdir -p /mnt/persistence/wrolpi
|
|
||||||
# The library must be owned by this image's wrolpi. ISOs before wrolpi
|
# The library must be owned by this image's wrolpi. ISOs before wrolpi
|
||||||
# became a system account wrote it as UID 1000, which a USB upgraded with a
|
# became a system account wrote it as UID 1000, which a USB upgraded with a
|
||||||
# newer ISO would leave unwritable; re-own it once.
|
# newer ISO would leave unwritable; re-own an existing library once.
|
||||||
if [ "$(stat -c %u /mnt/persistence/wrolpi)" != "$(id -u wrolpi)" ]; then
|
if [ -d /mnt/persistence/wrolpi ] \
|
||||||
|
&& [ "$(stat -c %u /mnt/persistence/wrolpi)" != "$(id -u wrolpi)" ]; then
|
||||||
progress "Updating library ownership for this WROLPi version..."
|
progress "Updating library ownership for this WROLPi version..."
|
||||||
chown -R wrolpi:wrolpi /mnt/persistence/wrolpi
|
chown -R wrolpi:wrolpi /mnt/persistence/wrolpi
|
||||||
note_action "Updated the library's ownership for this WROLPi version"
|
note_action "Updated the library's ownership for this WROLPi version"
|
||||||
fi
|
fi
|
||||||
|
mkdir -p /mnt/persistence/wrolpi
|
||||||
chown wrolpi:wrolpi /mnt/persistence/wrolpi
|
chown wrolpi:wrolpi /mnt/persistence/wrolpi
|
||||||
|
|
||||||
# persistence.conf: live-boot reads this on boot and applies the bind
|
# persistence.conf: live-boot reads this on boot and applies the bind
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue