Index: etc/rc.d/swaplate =================================================================== --- etc/rc.d/swaplate +++ etc/rc.d/swaplate @@ -12,7 +12,7 @@ name="swaplate" desc="Setup late swap space" start_cmd='/sbin/swapon -aLq' -stop_cmd='/sbin/swapoff -aq' +stop_cmd='/sbin/swapoff -aLq' load_rc_config swap run_rc_command "$1" Index: sbin/swapon/swapon.8 =================================================================== --- sbin/swapon/swapon.8 +++ sbin/swapon/swapon.8 @@ -98,6 +98,12 @@ .Dq noauto option is also set. If the +.Fl L +option is specified, +only swap devices with the +.Dq late +option will be removed. +If the .Fl q option is used, informational messages will not be Index: sbin/swapon/swapon.c =================================================================== --- sbin/swapon/swapon.c +++ sbin/swapon/swapon.c @@ -176,6 +176,10 @@ strstr(fsp->fs_mntops, "late") && late == 0) continue; + if (which_prog == SWAPOFF && + strstr(fsp->fs_mntops, "late") == NULL && + late != 0) + continue; swfile = swap_on_off(fsp->fs_spec, 1, fsp->fs_mntops); if (swfile == NULL) {