Skip to content
Snippets Groups Projects
Commit 6c628e78 authored by intrigeri's avatar intrigeri
Browse files

lib/vserver: added vservers_running function, use it in sys handler (to ease...

lib/vserver: added vservers_running function, use it in sys handler (to ease future fix for Trac#45)
parent ad8db347
Branches
Tags
No related merge requests found
......@@ -4,6 +4,9 @@ version 0.9.6 -- unreleased
. Allow the entire backup run to be halted by an action, thanks to
Matthew Palmer (Closes: #455836)
. Fixed tr construct reporting a warning (Closes: #452669)
lib changes
vserver:
. added vservers_running function
handler changes
dup:
. General cleanup
......@@ -15,7 +18,8 @@ version 0.9.6 -- unreleased
new syntax.
. Support every duplicity-supported transport with new configuration
option desturl (Closes: #483712, #346040, Trac#2).
. Actually allow to backup only VServers, by relaxing $include test.
.
Actually allow to backup only VServers, by relaxing $include test.
ldap:
. support HDB backend just as the BDB one, and make message clearer
when no supported backend is found (Closes: #476910)
......@@ -34,6 +38,7 @@ version 0.9.6 -- unreleased
sys:
. update for 2.6 kernels: use /proc/kallsyms instead of /proc/ksyms
(Closes: Trac#39)
. use new vservers_running function from lib/vserver
version 0.9.5 -- December 2, 2007
backupninja changes
......
......@@ -94,7 +94,7 @@ if [ "$packages" == "yes" ]; then
for vserver in $found_vservers; do
info "examining vserver: $vserver"
# is it running ?
$VSERVERINFO -q $vserver RUNNING
vservers_running $vserver
if [ $? -ne 0 ]; then
warning "The vserver $vserver is not running."
continue
......
......@@ -94,6 +94,20 @@ vservers_exist() {
return 0
}
##
## If all the arguments are running vservers names, returns 0.
## Else, returns 1. Also returns 1 if no argument is given.
##
vservers_running() {
[ $# -ge 1 ] || return 1
local args="$1"
local vserver
for vserver in $args ; do
$VSERVERINFO -q $vserver RUNNING || return 1
done
return 0
}
##
## If the argument is the name of a vserver selected by the current helper,
## echoes 'on' and returns 0.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment