install packages before we do anything else
This commit is contained in:
parent
ff6597b832
commit
8e5b94d176
14
boxctl.sh
14
boxctl.sh
@ -210,6 +210,13 @@ _ssh() {
|
|||||||
|
|
||||||
V=$(expand_v)
|
V=$(expand_v)
|
||||||
|
|
||||||
|
if [ -f ./packages ]; then
|
||||||
|
msg 0 "installing $(wc -l packages | awk '{print $1 " " $2}')"
|
||||||
|
cmd=$(printf "${PKG_DIFF_INSTALL}" $V $V)
|
||||||
|
_scp packages "${RUN_USER}@${SERVER}:/etc/packages.tmp"
|
||||||
|
_ssh ${RUN_USER}@${SERVER} "${cmd}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f ./groups ]; then
|
if [ -f ./groups ]; then
|
||||||
msg 0 "adding $(wc -l groups | awk '{print $1 " " $2}')"
|
msg 0 "adding $(wc -l groups | awk '{print $1 " " $2}')"
|
||||||
for group in $(cat groups); do
|
for group in $(cat groups); do
|
||||||
@ -279,13 +286,6 @@ EOF
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f ./packages ]; then
|
|
||||||
msg 0 "installing $(wc -l packages | awk '{print $1 " " $2}')"
|
|
||||||
cmd=$(printf "${PKG_DIFF_INSTALL}" $V $V)
|
|
||||||
_scp packages "${RUN_USER}@${SERVER}:/etc/packages.tmp"
|
|
||||||
_ssh ${RUN_USER}@${SERVER} "${cmd}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $MAINTENANCE == 1 ]; then
|
if [ $MAINTENANCE == 1 ]; then
|
||||||
msg 0 "cleaning up unused packages"
|
msg 0 "cleaning up unused packages"
|
||||||
_ssh ${RUN_USER}@${SERVER} "/usr/sbin/pkg_delete $V -a"
|
_ssh ${RUN_USER}@${SERVER} "/usr/sbin/pkg_delete $V -a"
|
||||||
|
Loading…
Reference in New Issue
Block a user