projects
/
cloudstore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
get SLICE and ZSLICE from group name
[cloudstore.git]
/
init.d
/
_start_stop
diff --git
a/init.d/_start_stop
b/init.d/_start_stop
index
009eaed
..
c712d4d
100755
(executable)
--- a/
init.d/_start_stop
+++ b/
init.d/_start_stop
@@
-1,5
+1,11
@@
+# by default, detach from terminal
BACKGROUND=1
BACKGROUND=1
+# deduce name from script name
NAME=`basename $0`
NAME=`basename $0`
+# generate ZSLICE and SLICE from group name
+SLICE_GROUP=`echo $NAME | cut -d\- -f1`
+export SLICE=`grep $SLICE_GROUP /var/lib/extrausers/group | cut -d: -f2`
+export ZSLICE=`echo $SLICE | sed 's;^;;'`
_start_stop() {
_start_stop() {