trunk: added the possibility to set VSNAMES to "all"
intrigeri
18 years ago
201 | 201 |
test -d "$VROOTDIR" || \
|
202 | 202 |
fatal "VSNAMES is not empty, but VROOTDIR ($VROOTDIR) does not exist." \
|
203 | 203 |
"Please set VROOTDIR in /etc/metche.conf."
|
|
204 |
# expand VSNAMES if it is set to "all"
|
|
205 |
if [ "$VSNAMES" = all ]; then
|
|
206 |
VSNAMES=`ls $VROOTDIR | grep -E -v "lost\+found|ARCHIVES" | tr "\n" " "`
|
|
207 |
if [ -z "$VSNAMES" ]; then
|
|
208 |
warning "VSNAMES is set to \"all\", but no VServer could be found" \
|
|
209 |
"in VROOTDIR ($VROOTDIR)."
|
|
210 |
fi
|
|
211 |
fi
|
204 | 212 |
fi
|
205 | 213 |
|
206 | 214 |
if [ "$ENCRYPT_EMAIL" = "yes" ]; then
|
|
773 | 781 |
;;
|
774 | 782 |
|
775 | 783 |
test)
|
776 | |
context_config "$VSNAME" || fatal "Aborting (error $?)."
|
777 | |
milestone_version "stable-200507040202"
|
778 | |
milestone_version "testing-latest"
|
779 | |
milestone_date "testing-latest"
|
780 | |
#report_changes "testing-latest" | email "testing-$DATE"
|
|
784 |
for i in "" $VSNAMES; do
|
|
785 |
res=0
|
|
786 |
context_config "$i" || res=$?
|
|
787 |
if [ $res -ne 0 ]; then
|
|
788 |
warning "-------- Ignoring" \
|
|
789 |
"`if [ -z $i ]; then \
|
|
790 |
echo 'the host system'; \
|
|
791 |
else \
|
|
792 |
echo VServer $i; fi` (error $res)"
|
|
793 |
continue
|
|
794 |
fi
|
|
795 |
milestone_version "stable-200507040202"
|
|
796 |
milestone_version "testing-latest"
|
|
797 |
milestone_date "testing-latest"
|
|
798 |
#report_changes "testing-latest" | email "testing-$DATE"
|
|
799 |
done
|
781 | 800 |
;;
|
782 | 801 |
|
783 | 802 |
*)
|
59 | 59 |
#
|
60 | 60 |
|
61 | 61 |
# VServers to monitor (space-separated list)
|
62 | |
# NB: the host system is monitored, whatever VSERVERS is set to.
|
|
62 |
# The host system is monitored, whatever VSERVERS is set to.
|
|
63 |
# Set VSNAMES to "all" in order to monitor all VServers.
|
63 | 64 |
#VSNAMES=""
|
|
65 |
#VSNAMES="all"
|
64 | 66 |
|
65 | 67 |
# vserver-info command location
|
66 | 68 |
#VSERVERINFO=/usr/sbin/vserver-info
|