Skip to content

Commit

Permalink
if a partition named FAI-DATA exists mount it to /media/data
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed Dec 8, 2023
1 parent 962eccb commit a592ab2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/fai
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ fai_init() {
mount -t efivarfs none /sys/firmware/efi/efivars
fi

mount-fai-data
# tune some nfs parameters
mount -oremount,ro,noatime /live/image

Expand Down
9 changes: 9 additions & 0 deletions lib/subroutines
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ _ifclass_or() {
return 1
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mount-fai-data() {

# if we have a partition FAI-DATA mount it
if [ -e /dev/disk/by-label/FAI-DATA ]; then
mkdir -p /media/data
mount /dev/disk/by-label/FAI-DATA /media/data
fi
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
rwmount() {

# remount partition read/write, for interactive use only
Expand Down

0 comments on commit a592ab2

Please sign in to comment.