Skip to content

Commit

Permalink
add rw_target(), which remounts /target read-write
Browse files Browse the repository at this point in the history
Can be used in the rescue environment (sysinfo), because sysinfo mounts the local disk read-only
  • Loading branch information
Mrfai committed Oct 15, 2022
1 parent 3e593f7 commit c961c7f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/subroutines
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ rwmount() {
mount -o rw,remount $1
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
rw_target() {

# make $target and mounted subdirectories read-write
local dir
for dir in $(mount | grep "on $target" | grep -E -v "media/mirror|tmpfs"| awk '{print $3}'); do
rwmount $dir
done
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ctam() {

# mount pseudo filesystems into /target
Expand Down

0 comments on commit c961c7f

Please sign in to comment.