diff options
author | allanjude <allanjude@FreeBSD.org> | 2015-05-17 00:55:44 +0000 |
---|---|---|
committer | allanjude <allanjude@FreeBSD.org> | 2015-05-17 00:55:44 +0000 |
commit | edcc51187304f54e79ae5136e8dfb9b152984b94 (patch) | |
tree | 95709f3169270d6780a8bc5fcfad0810d12ab767 /usr.sbin/bsdinstall/scripts | |
parent | 57daeeb7b4a28885d0af2f0aaa886fe7196dade4 (diff) | |
download | FreeBSD-src-edcc51187304f54e79ae5136e8dfb9b152984b94.zip FreeBSD-src-edcc51187304f54e79ae5136e8dfb9b152984b94.tar.gz |
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.
Diffstat (limited to 'usr.sbin/bsdinstall/scripts')
-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 7fa5cd3..a5521b7 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 \ |