projects
/
cloudstore.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20e2e59
)
init zfs slice
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 10 Oct 2011 20:27:20 +0000
(22:27 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 10 Oct 2011 20:27:20 +0000
(22:27 +0200)
bin/init-slice.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/bin/init-slice.sh
b/bin/init-slice.sh
new file mode 100755
(executable)
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
+