mkjail.sh

Check-in [f069590bad]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Give full path to pkg-static
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:f069590bad799289be8f594bde3aa257ed383c179fabfbf10652866b1988ba83
User & Date: feld 2018-10-04 14:38:10
Context
2018-10-04
14:39
Show help if no version is provided check-in: b74ac07ea7 user: feld tags: master, trunk
14:38
Give full path to pkg-static check-in: f069590bad user: feld tags: master, trunk
14:36
Fix showing usage when done upgrading check-in: 044dce0f14 user: feld tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/share/mkjail/upgrade.sh.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
    _snapshot
    echo "Updating ${JAILNAME} jail..."
    echo ""
    export UNAME_r=${MKJAILVER}
    freebsd-update -b ${JAILROOT}/${JAILNAME} -f ${JAILROOT}/${JAILNAME}/etc/freebsd-update.conf upgrade -r ${VERSION} || _cleanup
    freebsd-update -b ${JAILROOT}/${JAILNAME} -f ${JAILROOT}/${JAILNAME}/etc/freebsd-update.conf install || _cleanup
    freebsd-update -b ${JAILROOT}/${JAILNAME} -f ${JAILROOT}/${JAILNAME}/etc/freebsd-update.conf install || _cleanup
    jexec ${JAILNAME} pkg-static install -fy pkg || _cleanup
    jexec ${JAILNAME} pkg-static upgrade -fy || _cleanup
    zfs set mkjail:version=${VERSION} ${ZPOOL}${JAILROOT}/${JAILNAME}
}

_alljails()
{
    for i in $(jls -q name); do
      JAILNAME=${i}







|
|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
    _snapshot
    echo "Updating ${JAILNAME} jail..."
    echo ""
    export UNAME_r=${MKJAILVER}
    freebsd-update -b ${JAILROOT}/${JAILNAME} -f ${JAILROOT}/${JAILNAME}/etc/freebsd-update.conf upgrade -r ${VERSION} || _cleanup
    freebsd-update -b ${JAILROOT}/${JAILNAME} -f ${JAILROOT}/${JAILNAME}/etc/freebsd-update.conf install || _cleanup
    freebsd-update -b ${JAILROOT}/${JAILNAME} -f ${JAILROOT}/${JAILNAME}/etc/freebsd-update.conf install || _cleanup
    jexec ${JAILNAME} /usr/local/sbin/pkg-static install -fy pkg || _cleanup
    jexec ${JAILNAME} /usr/local/sbin/pkg-static upgrade -fy || _cleanup
    zfs set mkjail:version=${VERSION} ${ZPOOL}${JAILROOT}/${JAILNAME}
}

_alljails()
{
    for i in $(jls -q name); do
      JAILNAME=${i}