Commit 6841879c by Guba Sándor

store-server: Syntax error UserManager script

parent 6a8ef011
...@@ -249,8 +249,8 @@ def new_user(neptun): ...@@ -249,8 +249,8 @@ def new_user(neptun):
print "Invalid syntax" print "Invalid syntax"
abort(400, 'Invalid syntax') abort(400, 'Invalid syntax')
# Call user creator script # Call user creator script
print smbpasswd+" "+str(quota)
result = subprocess.call([ROOT_BIN_FOLDER+'/'+USER_MANAGER, 'add', neptun, smbpasswd, str(quota), hard_quota(quota)]) result = subprocess.call([ROOT_BIN_FOLDER+'/'+USER_MANAGER, 'add', neptun, smbpasswd, str(quota), hard_quota(quota)])
print "add "+neptun+" "+smbpasswd+" "+str(quota)+" "+hard_quota(quota)
if result == 0: if result == 0:
try: try:
for key in request.json['KEYS']: for key in request.json['KEYS']:
...@@ -331,7 +331,7 @@ def upload(hash_num): ...@@ -331,7 +331,7 @@ def upload(hash_num):
# Return hard quota from quota # Return hard quota from quota
def hard_quota(quota): def hard_quota(quota):
return str(int(quota*1.25)) return str(int(int(quota)*1.25))
# Define filebuffer for big uploads # Define filebuffer for big uploads
def fbuffer(f, chunk_size=4096): def fbuffer(f, chunk_size=4096):
......
...@@ -18,6 +18,8 @@ umask 022 ...@@ -18,6 +18,8 @@ umask 022
fi fi
case $COMMAND in case $COMMAND in
'add') 'add')
SOFT_QUOTA="$4"
HARD_QUOTA="$5"
if [ "x${SMB_PASSWD}" == "x" ]; then if [ "x${SMB_PASSWD}" == "x" ]; then
exit 1 exit 1
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment