Просмотр исходного кода

Added error handler for unsupported fs types

Serghey Rodin 11 лет назад
Родитель
Сommit
42a100cb96
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      bin/v-add-sys-quota

+ 5 - 0
bin/v-add-sys-quota

@@ -66,6 +66,11 @@ chmod a+x /etc/cron.daily/quotacheck
 # Enabling fs quota
 if [ ! -z "$(quotaon -pa|grep " $mnt "|grep user|grep 'off')" ]; then
     quotaon $mnt
+    if [ $? -ne 0 ]; then
+        echo "Error: quota can't be enabled on $mnt partition"
+        log_event "$E_DISK" "$EVENT"
+        exit $E_DISK
+    fi
 fi
 
 # Updating DISK_QUOTA value