From 77eea57a6a8d670843fd3133b5e45a37e3a81095 Mon Sep 17 00:00:00 2001 From: Philipp Wuensche Date: Tue, 12 Nov 2024 18:38:19 +0100 Subject: make the freebsd-update run from within other scripts --- ezjail-admin | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ezjail-admin') diff --git a/ezjail-admin b/ezjail-admin index 0620d32..6e3fb69 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -1013,8 +1013,8 @@ setup|update) zfs snapshot ${ezjail_jailzfs}/basejail@`date +"%C%y%m%d_%H:%M:%S"` zfs snapshot ${ezjail_jailzfs}/newjail@`date +"%C%y%m%d_%H:%M:%S"` fi - env PAGER=/bin/cat freebsd-update -b ${ezjail_jailbase} ${ezjail_urgency} install - env PAGER=/bin/cat freebsd-update -b ${ezjail_jailtemplate} ${ezjail_urgency} install + env PAGER=/bin/cat freebsd-update --not-running-from-cron -b ${ezjail_jailbase} ${ezjail_urgency} install + env PAGER=/bin/cat freebsd-update --not-running-from-cron -b ${ezjail_jailtemplate} ${ezjail_urgency} install elif [ "${ezjail_installaction}" = "freebsd-upgrade" ]; then [ -d "${ezjail_jailbase}" ] || exerr "Error: base jail does not exist.\n You cannot update a base jail until it is created.\n Please run '${ezjail_admin} update' or '${ezjail_admin} install' first." @@ -1029,9 +1029,9 @@ setup|update) # Finally run freebsd-update to upgrade our basejail for DESTDIR in ${ezjail_jailbase} ${ezjail_jailtemplate}; do - env UNAME_r="${ezjail_osversion_source}" PAGER=/bin/cat freebsd-update -b ${DESTDIR} -r ${ezjail_osversion_target} upgrade + env UNAME_r="${ezjail_osversion_source}" PAGER=/bin/cat freebsd-update --not-running-from-cron -b ${DESTDIR} -r ${ezjail_osversion_target} upgrade while [ $? -eq 0 ]; do - env UNAME_r="${ezjail_osversion_source}" PAGER=/bin/cat freebsd-update -b ${DESTDIR} -r ${ezjail_osversion_target} install + env UNAME_r="${ezjail_osversion_source}" PAGER=/bin/cat freebsd-update --not-running-from-cron -b ${DESTDIR} -r ${ezjail_osversion_target} install done done @@ -1212,7 +1212,7 @@ install) # Update to current patch level, split basejail and newjail if [ "${ezjail_basesystem}" ]; then - env PAGER=/bin/cat freebsd-update -b "${DESTDIR}" --currently-running "${ezjail_release}" fetch install + env PAGER=/bin/cat freebsd-update --not-running-from-cron -b "${DESTDIR}" --currently-running "${ezjail_release}" fetch install ezjail_splitworld fi -- cgit v1.2.3