mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
write mount options to fstab
This commit is contained in:
parent
48a6ac5d3c
commit
b83f137488
1 changed files with 2 additions and 6 deletions
|
@ -2539,12 +2539,8 @@ _mkfs() {
|
|||
# get real device name from lsblk first to get GUID_VALUE from blkid
|
||||
_GUID_VALUE="$(${_BLKID} -p -i -s PART_ENTRY_TYPE -o value $(${_LSBLK} NAME,UUID,LABEL,PARTLABEL,PARTUUID | grep $(echo ${_device} | cut -d"=" -f2) | cut -d" " -f 1))"
|
||||
if ! [[ "${_GUID_VALUE}" == "933ac7e1-2eb4-4f13-b844-0e14e2aef915" && "${_mountpoint}" == "/home" || "${_GUID_VALUE}" == "0657fd6d-a4ab-43c4-84e5-0933c84b4f4f" && "${_mountpoint}" == "swap" || "${_GUID_VALUE}" == "c12a7328-f81f-11d2-ba4b-00a0c93ec93b" && "${_mountpoint}" == "/boot" && "${_DETECTED_UEFI_BOOT}" == "1" || "${_mountpoint}" == "/" ]]; then
|
||||
if [[ "${_fstype}" = "btrfs" && -n "${_btrfsmountoptions}" ]]; then
|
||||
echo -n "${_device} ${_mountpoint} ${_fstype} defaults,${_btrfsmountoptions} 0 " >>/tmp/.fstab
|
||||
else
|
||||
echo -n "${_device} ${_mountpoint} ${_fstype} defaults 0 " >>/tmp/.fstab
|
||||
fi
|
||||
if [[ "${_fstype}" = "swap" ]]; then
|
||||
echo -n "${_device} ${_mountpoint} ${_fstype} defaults,${_mountoptions} 0 " >>/tmp/.fstab
|
||||
if [[ "${_fstype}" = "swap" || "${_fstype}" = "btrfs" ]]; then
|
||||
echo "0" >>/tmp/.fstab
|
||||
else
|
||||
echo "1" >>/tmp/.fstab
|
||||
|
|
Loading…
Reference in a new issue