.
This commit is contained in:
parent
5c9a260aa5
commit
2e8bdabea2
@ -166,6 +166,7 @@ fi
|
|||||||
if ! (($JAILSRC)); then
|
if ! (($JAILSRC)); then
|
||||||
echo "removing /usr/src files ... Ignore failure of removing . and .."
|
echo "removing /usr/src files ... Ignore failure of removing . and .."
|
||||||
iocage exec $JAIL "rm -rf /usr/src/* ; rm -f /usr/src/.*"
|
iocage exec $JAIL "rm -rf /usr/src/* ; rm -f /usr/src/.*"
|
||||||
|
iocage fstab -a $JAIL /usr/src /usr/src nullfs ro 0 0
|
||||||
iocage exec $JAIL "[ -f /mnt/config/freebsd-update.conf ] && cp /mnt/config/freebsd-update.conf /etc/ || cp /mnt/common/freebsd-update.conf /etc/"
|
iocage exec $JAIL "[ -f /mnt/config/freebsd-update.conf ] && cp /mnt/config/freebsd-update.conf /etc/ || cp /mnt/common/freebsd-update.conf /etc/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
SWREL="12.2-RELEASE"
|
||||||
|
|
||||||
update_jail ()
|
update_jail ()
|
||||||
{
|
{
|
||||||
echo "######## ## JAIL:::: $JAIL ##"
|
echo "######## ## JAIL:::: $JAIL ##"
|
||||||
@ -22,7 +24,7 @@ update_jail ()
|
|||||||
iocage exec $JAIL "freebsd-version"
|
iocage exec $JAIL "freebsd-version"
|
||||||
|
|
||||||
if [[ $1 == "upgrade" ]]; then
|
if [[ $1 == "upgrade" ]]; then
|
||||||
iocage upgrade -r 12.2-RELEASE $JAIL
|
iocage upgrade -r $SWREL $JAIL
|
||||||
# pkgp.conf updated to new release after an upgrade
|
# pkgp.conf updated to new release after an upgrade
|
||||||
iocage exec $JAIL "[ -f /mnt/config/pkgp.conf ] && cp /mnt/config/pkgp.conf /usr/local/etc/pkg/repos/ || cp /mnt/common/pkgp.conf /usr/local/etc/pkg/repos/"
|
iocage exec $JAIL "[ -f /mnt/config/pkgp.conf ] && cp /mnt/config/pkgp.conf /usr/local/etc/pkg/repos/ || cp /mnt/common/pkgp.conf /usr/local/etc/pkg/repos/"
|
||||||
iocage exec $JAIL "pkg-static upgrade -f -y"
|
iocage exec $JAIL "pkg-static upgrade -f -y"
|
||||||
@ -39,7 +41,7 @@ update_jail ()
|
|||||||
|
|
||||||
# iocage exec $JAIL "rm -rf /var/tmp/temproot*"
|
# iocage exec $JAIL "rm -rf /var/tmp/temproot*"
|
||||||
# iocage exec $JAIL "mergemaster -a"
|
# iocage exec $JAIL "mergemaster -a"
|
||||||
iocage exec $JAIL "etcupdate -t /mnt/common/current-src.bzip2"
|
iocage exec $JAIL "etcupdate -t /mnt/common/$SWREL.bzip2"
|
||||||
|
|
||||||
iocage exec $JAIL "freebsd-version"
|
iocage exec $JAIL "freebsd-version"
|
||||||
|
|
||||||
@ -47,9 +49,9 @@ update_jail ()
|
|||||||
#read -p "continue, ctrl-c to abort? " RESP
|
#read -p "continue, ctrl-c to abort? " RESP
|
||||||
}
|
}
|
||||||
|
|
||||||
iocage fetch -U -r 12.2-RELEASE
|
iocage fetch -U -r $SWREL
|
||||||
etcupdate build current-src.bzip2
|
etcupdate build $SWREL.bzip2
|
||||||
mv current-src.bzip2 /root/FreeBSD/jails/configs/common/
|
mv $SWREL.bzip2 /root/FreeBSD/jails/configs/common/
|
||||||
|
|
||||||
read -p "update pkgp packages first (y/N)? " RESP
|
read -p "update pkgp packages first (y/N)? " RESP
|
||||||
if [ ! -z $RESP ] && [ $RESP == "y" ]; then
|
if [ ! -z $RESP ] && [ $RESP == "y" ]; then
|
||||||
@ -76,7 +78,7 @@ fi
|
|||||||
|
|
||||||
echo "update base system by running:"
|
echo "update base system by running:"
|
||||||
echo "freebsd-update fetch"
|
echo "freebsd-update fetch"
|
||||||
# echo "freebsd-update upgrade -r 13.0-RELEASE"
|
# echo "freebsd-update upgrade -r $SWREL"
|
||||||
echo "freebsd-update install"
|
echo "freebsd-update install"
|
||||||
# echo "pkg bootstrap -f ; pkg update ; pkg upgrade"
|
# echo "pkg bootstrap -f ; pkg update ; pkg upgrade"
|
||||||
echo "cd /usr/src; svn update; make -j8 buildkernel KERNCONF=diyIT && make -j8 installkernel KERNCONF=diyIT"
|
echo "cd /usr/src; svn update; make -j8 buildkernel KERNCONF=diyIT && make -j8 installkernel KERNCONF=diyIT"
|
||||||
@ -84,6 +86,6 @@ echo "reboot"
|
|||||||
echo "pkg-static upgrade -f"
|
echo "pkg-static upgrade -f"
|
||||||
#echo "rm -rf /var/tmp/temproot*"
|
#echo "rm -rf /var/tmp/temproot*"
|
||||||
#echo "mergemaster -a"
|
#echo "mergemaster -a"
|
||||||
echo "etcupdate -t /mnt/common/current-src.bzip2"
|
echo "etcupdate -t /mnt/common/$SWREL.bzip2"
|
||||||
|
|
||||||
echo "/root/FreeBSD/scripts/zfs-prune-snapshots -vn -p 'ioc_update' 1d | grep removing"
|
echo "/root/FreeBSD/scripts/zfs-prune-snapshots -vn -p 'ioc_update' 1d | grep removing"
|
||||||
|
Loading…
Reference in New Issue
Block a user