display and/or create md5sum in user.md5 xattr
[cloudstore.git] / bin / init-slice.sh
1 #!/bin/sh -xe
2
3 . ./env.sh
4
5 ZSLICE=`echo $SLICE | sed "s!^/!!"`
6
7 group=`basename $SLICE`
8 grep "^$group:" /var/lib/extrausers/group || echo "$group:$SLICE:$PORT:" >> /var/lib/extrausers/group
9
10 grep "^md5:" /var/lib/extrausers/passwd || echo "md5::2000:$PORT:md5@example.com:$SLICE/md5:/bin/false" >> /var/lib/extrausers/passwd
11
12
13 zfs create $ZSLICE
14 mkdir $SLICE/md5
15 chown md5:$group $SLICE/md5
16