unquote quota in case of NULL
This commit is contained in:
parent
3302ae6dcc
commit
8cc3a8a109
|
@ -44,7 +44,7 @@ if [[ -n $quota ]]; then
|
||||||
# make quota uppercase in case it is set to NULL
|
# make quota uppercase in case it is set to NULL
|
||||||
quota=`echo $quota | tr [:lower:] [:upper:]`
|
quota=`echo $quota | tr [:lower:] [:upper:]`
|
||||||
if [[ "$quota" =~ ^[0-9]+$ ]] || [[ "$quota" == "NULL" ]]; then
|
if [[ "$quota" =~ ^[0-9]+$ ]] || [[ "$quota" == "NULL" ]]; then
|
||||||
dbset=" mbox_quota_default=\"$quota\""
|
dbset=" mbox_quota_default=$quota"
|
||||||
else
|
else
|
||||||
echo "ERROR: quota (-q) must numeric or NULL"
|
echo "ERROR: quota (-q) must numeric or NULL"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -59,7 +59,7 @@ if [[ -n $limit ]]; then
|
||||||
if [ ! -z "$dbset" ]; then
|
if [ ! -z "$dbset" ]; then
|
||||||
dbset="$dbset,"
|
dbset="$dbset,"
|
||||||
fi
|
fi
|
||||||
dbset="$dbset mbox_limit=\"$limit\""
|
dbset="$dbset mbox_limit=$limit"
|
||||||
else
|
else
|
||||||
echo "ERROR: limit (-l) must numeric or NULL"
|
echo "ERROR: limit (-l) must numeric or NULL"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -47,7 +47,7 @@ if [ -n "$quota" ]; then
|
||||||
# make quota uppercase in case it is set to NULL
|
# make quota uppercase in case it is set to NULL
|
||||||
quota=`echo $quota | tr [:lower:] [:upper:]`
|
quota=`echo $quota | tr [:lower:] [:upper:]`
|
||||||
if [[ "$quota" =~ ^[0-9]+$ ]] || [[ "$quota" == "NULL" ]]; then
|
if [[ "$quota" =~ ^[0-9]+$ ]] || [[ "$quota" == "NULL" ]]; then
|
||||||
dbset=" quota=\"$quota\""
|
dbset=" quota=$quota"
|
||||||
else
|
else
|
||||||
echo "ERROR: quota (-q) must numeric or NULL"
|
echo "ERROR: quota (-q) must numeric or NULL"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -74,9 +74,8 @@ fi
|
||||||
if [ -n "$dbset" ]; then
|
if [ -n "$dbset" ]; then
|
||||||
|
|
||||||
# build query
|
# build query
|
||||||
dbcmd="mysql --defaults-extra-file=$MYSQL_CONNECTION_INFO_FILE -e 'UPDATE vm_mboxes SET $dbset WHERE mbox.id=\"$mbox_id\";'"
|
dbcmd="mysql --defaults-extra-file=$MYSQL_CONNECTION_INFO_FILE -e 'UPDATE vm_mboxes SET $dbset WHERE id=\"$mbox_id\";'"
|
||||||
# eval $dbcmd
|
eval $dbcmd
|
||||||
echo $dbcmd
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user