2018-10-09 10:48:09 +02:00
|
|
|
#!/bin/csh
|
|
|
|
|
2022-02-01 20:20:40 +01:00
|
|
|
# upgrade host packages
|
2018-10-09 10:48:09 +02:00
|
|
|
echo ""
|
|
|
|
echo "############ UPGRADE HOST PACKAGES ############"
|
|
|
|
echo ""
|
2022-02-01 20:20:40 +01:00
|
|
|
pkg update
|
|
|
|
pkg upgrade -y
|
2018-10-09 10:48:09 +02:00
|
|
|
pkg clean -ya
|
|
|
|
|
2022-02-01 20:20:40 +01:00
|
|
|
# upgrade jail packages
|
2018-10-09 10:48:09 +02:00
|
|
|
echo ""
|
|
|
|
echo "############ UPGRADE JAIL PACKAGES ############"
|
2022-02-01 20:20:40 +01:00
|
|
|
foreach jailid (`/usr/sbin/jls jid`)
|
2018-10-09 10:48:09 +02:00
|
|
|
|
2022-02-01 20:20:40 +01:00
|
|
|
# get the jailname from the jailid
|
|
|
|
set jailname = `/usr/sbin/jls jid host.hostname |\
|
|
|
|
grep $jailid |\
|
|
|
|
cut -d' ' -f2`
|
|
|
|
|
|
|
|
# update the jail packages using jailid but reporitng jailname
|
2018-10-09 10:48:09 +02:00
|
|
|
echo ""
|
2022-02-01 20:20:40 +01:00
|
|
|
echo "Updating $jailname"
|
|
|
|
pkg -j $jailid update
|
|
|
|
pkg -j $jailid upgrade -y
|
|
|
|
pkg -j $jailid clean -ay
|
2018-10-09 10:48:09 +02:00
|
|
|
|
|
|
|
end
|
|
|
|
|
2022-02-01 20:20:40 +01:00
|
|
|
# report done
|
2018-10-09 10:48:09 +02:00
|
|
|
echo ""
|
|
|
|
echo "############### ALL DONE THANKS ###############"
|
2022-02-01 20:20:40 +01:00
|
|
|
echo ""
|