diff options
author | Allan Jude <allanjude@FreeBSD.org> | 2015-05-17 00:55:44 +0000 |
---|---|---|
committer | Allan Jude <allanjude@FreeBSD.org> | 2015-05-17 00:55:44 +0000 |
commit | caa3817d4fe7b685bd731d3c3e7ca793ca16630a (patch) | |
tree | 95709f3169270d6780a8bc5fcfad0810d12ab767 /usr.sbin | |
parent | 623d2d40afd63f1a271f4eb1c833720e4920577e (diff) | |
download | src-caa3817d4fe7b685bd731d3c3e7ca793ca16630a.tar.gz src-caa3817d4fe7b685bd731d3c3e7ca793ca16630a.zip |
bsdinstall/zfsboot: Skip adding swap lines to /etc/fstab if swap is 0 sized
Differential Revision: https://reviews.freebsd.org/D2571
Reviewed by: dim
Approved by: eadler (mentor)
Sponsored by: ScaleEngine Inc.
Notes
Notes:
svn path=/head/; revision=283023
Diffstat (limited to 'usr.sbin')
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/zfsboot | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 7fa5cd3b7a9f..a5521b7c53e9 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -953,6 +953,8 @@ zfs_create_diskpart() esac # $ZFSBOOT_PARTITION_SCHEME # Update fstab(5) + local swapsize + f_expand_number "$ZFSBOOT_SWAP_SIZE" swapsize if [ "$isswapmirror" ]; then # This is not the first disk in the mirror, do nothing elif [ "$ZFSBOOT_SWAP_ENCRYPTION" -a "$ZFSBOOT_SWAP_MIRROR" ]; then @@ -972,6 +974,8 @@ zfs_create_diskpart() /dev/$disk${swappart}.eli none swap sw 0 0 \ $BSDINSTALL_TMPETC/fstab || return $FAILURE + elif [ ${swapsize:-0} -eq 0 ] + # If swap is 0 sized, don't add it to fstab else f_eval_catch $funcname printf "$PRINTF_FSTAB" \ /dev/$disk$swappart none swap sw 0 0 \ |