From: Dobrica Pavlinusic Date: Mon, 10 Oct 2011 20:27:20 +0000 (+0200) Subject: init zfs slice X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;ds=sidebyside;h=1462336e77968d11ff4fd021cfe6027a21aa4798;p=cloudstore.git init zfs slice --- 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 +