aboutsummaryrefslogtreecommitdiff
path: root/sysutils/firstboot-freebsd-update
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2015-03-31 01:26:19 +0000
committerColin Percival <cperciva@FreeBSD.org>2015-03-31 01:26:19 +0000
commit042e134f956d91233a0615b61d6dacf64baad775 (patch)
treef19c3cc055f996435ecd8d22d7f345deb40099f0 /sysutils/firstboot-freebsd-update
parentd0bd54e74108d61cb4e1a5fc642e5f53d9b5970e (diff)
Notes
Diffstat (limited to 'sysutils/firstboot-freebsd-update')
-rw-r--r--sysutils/firstboot-freebsd-update/Makefile2
-rw-r--r--sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in19
2 files changed, 20 insertions, 1 deletions
diff --git a/sysutils/firstboot-freebsd-update/Makefile b/sysutils/firstboot-freebsd-update/Makefile
index 596b059413d9..c7378d2e356c 100644
--- a/sysutils/firstboot-freebsd-update/Makefile
+++ b/sysutils/firstboot-freebsd-update/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= firstboot-freebsd-update
-PORTVERSION= 1.1
+PORTVERSION= 1.2
CATEGORIES= sysutils
MASTER_SITES= # none
DISTFILES= # none
diff --git a/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in b/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in
index 62bb9045d8a8..d2a925d9691f 100644
--- a/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in
+++ b/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in
@@ -9,10 +9,18 @@
# image, since this only runs on the first boot) to enable this:
#
# firstboot_freebsd_update_enable="YES"
+#
+# By default this script will only run on *-BETA*, *-RC*, and *-RELEASE*
+# systems, since those are the only ones for which updates are provided by
+# the FreeBSD project; to run freebsd-update anyway (e.g., on a custom
+# release for which you are providing your own update bits), set:
+#
+# firstboot_freebsd_update_nonstandard="YES"
. /etc/rc.subr
: ${firstboot_freebsd_update_enable:="NO"}
+: ${firstboot_freebsd_update_nonstandard:="NO"}
name="firstboot_freebsd_update"
rcvar=firstboot_freebsd_update_enable
@@ -22,6 +30,17 @@ stop_cmd=":"
firstboot_freebsd_update_run()
{
+ if ! checkyesno firstboot_freebsd_update_nonstandard; then
+ case "`uname -r`" in
+ *-BETA* | *-RC* | *-RELEASE*)
+ ;;
+ *)
+ echo "Firstboot freebsd-update disabled on `uname -r`"
+ return 0
+ ;;
+ esac
+ fi
+
freebsd-update fetch
if [ -e /var/db/freebsd-update/`echo / | sha256`-install ]; then
freebsd-update install