Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
annotate share/examples/local-bsdtools/freebsd-update-ftjail-template.sh @ 678:7cb722530334
Examples: FIX: "ftjail umount-tmpl" does not accept options: remove "-P"
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Tue, 01 Oct 2024 00:20:17 +0200 |
| parents | 035c5467a0d4 |
| children |
| rev | line source |
|---|---|
|
437
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
1 #!/bin/sh |
|
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
2 |
|
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
3 set -e |
|
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
4 set -x |
|
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
5 set -u |
|
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
6 |
|
670
035c5467a0d4
Examples: make them a little more generic
Franz Glasner <fzglas.hg@dom66.de>
parents:
667
diff
changeset
|
7 : ${RELEASE:="13.2"} |
|
035c5467a0d4
Examples: make them a little more generic
Franz Glasner <fzglas.hg@dom66.de>
parents:
667
diff
changeset
|
8 : ${NEW_VER:="p5"} |
|
035c5467a0d4
Examples: make them a little more generic
Franz Glasner <fzglas.hg@dom66.de>
parents:
667
diff
changeset
|
9 |
| 667 | 10 BASE_RO="dpool/jail/ttmpl/base-ro/${RELEASE}-RELEASE" |
| 11 SKEL_RW="dpool/jail/ttmpl/skel-rw/${RELEASE}-RELEASE" | |
|
670
035c5467a0d4
Examples: make them a little more generic
Franz Glasner <fzglas.hg@dom66.de>
parents:
667
diff
changeset
|
12 NEW_ETCUPDATE_CURRENT="/jail/RELEASE/etcupdate-current-${RELEASE}@${NEW_VER}.tbz" |
|
437
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
13 |
| 667 | 14 MOUNTPOINT="/var/tmp/${RELEASE}" |
|
437
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
15 |
|
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
16 ftjail mount-tmpl -P "$BASE_RO" "$SKEL_RW" "$MOUNTPOINT" |
|
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
17 |
| 667 | 18 freebsd-update -b "$MOUNTPOINT" --currently-running "${RELEASE}-RELEASE" fetch |
|
437
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
19 freebsd-update -b "$MOUNTPOINT" install |
|
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
20 |
|
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
21 ftjail snapshot-tmpl "$BASE_RO" "$SKEL_RW" "$NEW_VER" |
|
59622f32279d
Add two examples of how to use ftjail and friends to (freebsd-)update a thin jail.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
22 |
|
670
035c5467a0d4
Examples: make them a little more generic
Franz Glasner <fzglas.hg@dom66.de>
parents:
667
diff
changeset
|
23 ftjail build-etcupdate-current-tmpl "$MOUNTPOINT" "${NEW_ETCUPDATE_CURRENT}" |
| 667 | 24 |
|
678
7cb722530334
Examples: FIX: "ftjail umount-tmpl" does not accept options: remove "-P"
Franz Glasner <fzglas.hg@dom66.de>
parents:
670
diff
changeset
|
25 ftjail umount-tmpl "$BASE_RO" "$SKEL_RW" |
