mkjail.sh

Check-in [822ad6fc41]
Login

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

Overview
Comment:Improve rollback
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:822ad6fc41970847f8ab886b97c0a15403f86170aa66d99b9741cb16704bd0a3
User & Date: feld 2018-10-11 14:06:23
Context
2018-10-18
19:00
Upgrade -a should skip if the jail has the same version installed check-in: e69a7bcc05 user: feld tags: master, trunk
2018-10-11
14:06
Improve rollback check-in: 822ad6fc41 user: feld tags: master, trunk
2018-10-04
14:43
Move this check earlier so it fires first check-in: 86c7421ab3 user: feld tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
_snapshot()
{
    zfs snapshot ${ZPOOL}${JAILROOT}/${JAILNAME}@${SNAPNAME}
}

_rollback()
{
    zfs rollback ${ZPOOL}${JAILROOT}/${JAILNAME}@${SNAPNAME}
}

_rmsnap()
{
    zfs destroy ${ZPOOL}${JAILROOT}/${JAILNAME}@${SNAPNAME}
}

_cleanup()
{
    echo ""
    echo "Upgrade cancelled: reverting changes and cleaning up."
    _rollback







|




|







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
_snapshot()
{
    zfs snapshot ${ZPOOL}${JAILROOT}/${JAILNAME}@${SNAPNAME}
}

_rollback()
{
    zfs rollback -r ${ZPOOL}${JAILROOT}/${JAILNAME}@${SNAPNAME}
}

_rmsnap()
{
    zfs destroy -r ${ZPOOL}${JAILROOT}/${JAILNAME}@${SNAPNAME}
}

_cleanup()
{
    echo ""
    echo "Upgrade cancelled: reverting changes and cleaning up."
    _rollback