merge toplevel-dynamic-environment
[hcoop/domtool2.git] / bootstrap / domtool-create-shared-root
1 #!/bin/bash
2
3 # Create shared directories, set permissions
4
5 SHAREDROOT=`../bin/domtool-config -path shared-root`
6
7 if [ -z "$SHAREDROOT" ]; then
8 echo "shared-root not set, domtool not built?"
9 exit 1
10 fi
11
12 function if_afs () {
13 if [[ $SHAREDROOT == /afs/* ]]; then
14 $*
15 fi
16 }
17
18 if_afs echo "AFS in use. This will not work correctly."
19
20 set -x
21
22 mkdir -p $SHAREDROOT
23
24 for d in backup certs email firewall keys lib logs nodes nodes.old serials webalizer; do
25 mkdir $SHAREDROOT/$d
26 done
27
28 touch $SHAREDROOT/firewall/user.rules
29