diff --git a/sysutils/firstboot-freebsd-update/Makefile b/sysutils/firstboot-freebsd-update/Makefile index fd86494e9571..ae3a9d035acc 100644 --- a/sysutils/firstboot-freebsd-update/Makefile +++ b/sysutils/firstboot-freebsd-update/Makefile @@ -1,18 +1,18 @@ PORTNAME= firstboot-freebsd-update -PORTVERSION= 1.2 +PORTVERSION= 1.3 CATEGORIES= sysutils MASTER_SITES= # none DISTFILES= # none EXTRACT_ONLY= # none MAINTAINER= cperciva@FreeBSD.org COMMENT= Update the system using freebsd-update when it first boots NO_WRKSUBDIR= yes NO_BUILD= yes NO_INSTALL= yes NO_ARCH= yes USE_RC_SUBR= firstboot_freebsd_update .include diff --git a/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in b/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in index d2a925d9691f..220825e87710 100644 --- a/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in +++ b/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in @@ -1,54 +1,54 @@ #!/bin/sh # KEYWORD: firstboot # PROVIDE: firstboot_freebsd_update # REQUIRE: syslogd NETWORKING # BEFORE: LOGIN # Add the following lines to /etc/rc.conf.local or /etc/rc.conf (in the disk # 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 start_cmd="firstboot_freebsd_update_run | logger -s -t 'freebsd-update'" 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 + freebsd-update --not-running-from-cron fetch if [ -e /var/db/freebsd-update/`echo / | sha256`-install ]; then freebsd-update install echo "Requesting reboot after installing updates." touch ${firstboot_sentinel}-reboot fi } load_rc_config $name run_rc_command "$1"