Add local and chroot backends.
[matthijs/upstream/backupninja.git] / lib / backends / local.in
1 # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
2 # vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
3
4 function backend_local_init () {
5         # We're always available
6         return 0
7 }
8
9 function backend_local_host_available () {
10    if [ -n "$1" ]; then
11       eval "$2=The local backend does not support named hosts: '\$1'"
12       return 1
13    fi
14    # The empty host (i.e., "local:") is always available
15    return 0
16 }
17
18 function backend_local_host_root () {
19    # We just use the entire filesystem
20    echo ""
21 }
22
23 function backend_local_run () {
24    # Running locally is simple, just run the command
25    "$@"
26 }
27
28 function backend_local_interpolate_vars () {
29    echo ""
30 }
31
32 function backend_local_interpolate_value () {
33 }