Date: Fri, 8 Apr 2016 15:05:06 +0000 (UTC) From: Allan Jude <allanjude@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297712 - head/usr.sbin/bsdinstall/scripts Message-ID: <201604081505.u38F567f056215@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: allanjude Date: Fri Apr 8 15:05:06 2016 New Revision: 297712 URL: https://svnweb.freebsd.org/changeset/base/297712 Log: Do not add swap to fstab when swapsize is 0 If a user requested encrypted swap, but 0 sized, it would still be added to fstab PR: 208630 Submitted by: Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com> MFC after: 2 weeks Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Fri Apr 8 13:43:39 2016 (r297711) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Fri Apr 8 15:05:06 2016 (r297712) @@ -964,6 +964,8 @@ zfs_create_diskpart() f_expand_number "$ZFSBOOT_SWAP_SIZE" swapsize if [ "$isswapmirror" ]; then # This is not the first disk in the mirror, do nothing + elif [ ${swapsize:-0} -eq 0 ]; then + # If swap is 0 sized, don't add it to fstab elif [ "$ZFSBOOT_SWAP_ENCRYPTION" -a "$ZFSBOOT_SWAP_MIRROR" ]; then f_eval_catch $funcname printf "$PRINTF_FSTAB" \ /dev/mirror/swap.eli none swap sw 0 0 \ @@ -981,8 +983,6 @@ zfs_create_diskpart() /dev/$disk${swappart}.eli none swap sw 0 0 \ $BSDINSTALL_TMPETC/fstab || return $FAILURE - elif [ ${swapsize:-0} -eq 0 ]; then - # 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 \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604081505.u38F567f056215>