File: bareos-config.in

package info (click to toggle)
bareos 14.2.1%2B20141017gitc6c5b56-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 21,136 kB
  • sloc: ansic: 192,574; sh: 16,581; cpp: 15,290; makefile: 3,625; sql: 3,289; python: 768; lisp: 721; perl: 156; xml: 57; sed: 45; awk: 8
file content (39 lines) | stat: -rw-r--r-- 547 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh

LIB=@scriptdir@/bareos-config-lib.sh

if ! [ -r "$LIB" ]; then
    echo "failed to read library $LIB"
    exit 1
fi
. $LIB

usage()
{
cat <<-EOT
usage: $0 <function>
EOT
    exit 1
}

help()
{
    usage
}

# number of args passed
args=$#

# without parameter, nothing is done.
# this allows this script to be sourced
# to use its functions
if [ $args -ge 1 ]; then
    # executes given arguments
    if is_function $1; then
        "$@"
    else
        echo "failed to execute $*. Not found."
        #usage
        exit 127
    fi
fi