git: 099b125337de - stable/13 - rc: improve dependencies for growfs

From: Edward Tomasz Napierala <>
Date: Tue, 22 Feb 2022 13:24:42 UTC
The branch stable/13 has been updated by trasz:


commit 099b125337def5a3f94aad49c3cc32e583181153
Author:     Edward Tomasz Napierala <>
AuthorDate: 2021-04-25 12:41:36 +0000
Commit:     Edward Tomasz Napierala <>
CommitDate: 2022-02-17 00:09:25 +0000

    rc: improve dependencies for growfs
    Previously it depended on sysctl, which itself has no dependencies,
    so rcorder(8) had a bit too much flexibility when choosing when to run
    it.  Make sure it runs just between 'fsck' and 'root'.
    Reviewed By:    jmg, imp
    Sponsored By:   EPSRC
    Differential Revision:
    (cherry picked from commit b68e6569221ecade8899eaab8e1b088947ef2f8a)
 libexec/rc/rc.d/growfs | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/libexec/rc/rc.d/growfs b/libexec/rc/rc.d/growfs
index 54bab2a60dfb..c2955c740d43 100755
--- a/libexec/rc/rc.d/growfs
+++ b/libexec/rc/rc.d/growfs
@@ -28,15 +28,17 @@
 # PROVIDE: growfs
-# BEFORE: sysctl
+# REQUIRE: fsck
+# BEFORE: root
 # KEYWORD: firstboot
 # This allows us to distribute an image
 # and have it work on essentially any size drive.
-# TODO: Figure out where this should really be ordered.
-# I suspect it should go just after fsck but before mountcritlocal.
+# Note that this uses awk(1), and thus will not work if /usr is on a separate
+# filesystem.  We need to run early, because there might be not enough free
+# space on rootfs for the boot to succeed, and on images we ship - which are
+# the primary purpose of this script - there is no separate /usr anyway.
 . /etc/rc.subr