equal
deleted
inserted
replaced
2 # vim: set ft=sh : |
2 # vim: set ft=sh : |
3 |
3 |
4 # Bootstrap |
4 # Bootstrap |
5 if [ $0 == './update' ]; then |
5 if [ $0 == './update' ]; then |
6 SRV=$(pwd) |
6 SRV=$(pwd) |
7 OPT=./opt |
7 OPT=/opt/pvl-verkko |
|
8 LIB=/opt/pvl-dns/lib |
8 else |
9 else |
9 SRV=${SRV:-/srv/dns} |
10 SRV=${SRV:-/srv/verkko} |
10 OPT=${SRV:-/srv/dns/opt} |
11 OPT=${SRV:-/opt/pvl-verkko} |
|
12 LIB=/opt/pvl-dns/lib |
11 cd $SRV |
13 cd $SRV |
12 fi |
14 fi |
13 |
15 |
14 source lib/update |
16 source $LIB/update |
15 |
17 |
16 function commit { |
18 function commit { |
17 ## Commit |
19 ## Commit |
18 # pre-commit check |
20 # pre-commit check |
19 log "Testing hosts..." |
21 log "Testing hosts..." |
101 ## Main entry point |
103 ## Main entry point |
102 function main { |
104 function main { |
103 parse_args "$@" |
105 parse_args "$@" |
104 |
106 |
105 ## Input dirs |
107 ## Input dirs |
106 for dir in etc etc/zones etc/hosts opt; do |
108 for dir in etc etc/zones etc/hosts; do |
107 [ -d $dir ] || die "Missing directory: $dir" |
109 [ -d $dir ] || die "Missing directory: $dir" |
108 done |
110 done |
109 |
111 |
110 ## Output dirs |
112 ## Output dirs |
111 ensure_dir var |
113 ensure_dir var |