X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=bin%2Finit-slice.sh;fp=bin%2Finit-slice.sh;h=a0be54550ff453725769d93dc9ca481ba61135bc;hb=1462336e77968d11ff4fd021cfe6027a21aa4798;hp=0000000000000000000000000000000000000000;hpb=20e2e59ca7c1c98f51b377270e77272d6bbab99e;p=cloudstore.git diff --git a/bin/init-slice.sh b/bin/init-slice.sh new file mode 100755 index 0000000..a0be545 --- /dev/null +++ b/bin/init-slice.sh @@ -0,0 +1,16 @@ +#!/bin/sh -xe + +. ./env.sh + +ZSLICE=`echo $SLICE | sed "s!^/!!"` + +group=`basename $SLICE` +grep "^$group:" /var/lib/extrausers/group || echo "$group:$SLICE:$PORT:" >> /var/lib/extrausers/group + +grep "^md5:" /var/lib/extrausers/passwd || echo "md5::2000:$PORT:md5@example.com:$SLICE/md5:/bin/false" >> /var/lib/extrausers/passwd + + +zfs create $ZSLICE +mkdir $SLICE/md5 +chown md5:$group $SLICE/md5 +