Skip to content

Commit 9f38612

Browse files
author
Kristan Kenney
committed
Merge branch 'fix-quota-backend'
2 parents b453b7a + b30739d commit 9f38612

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

bin/v-add-sys-quota

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ source $HESTIA/conf/hestia.conf
1818
# Verifications #
1919
#----------------------------------------------------------#
2020

21+
# Ensure that quota kernel modules are installed
22+
kernel_module_check=$(find /lib/modules/`uname -r` -type f -name '*quota_v*.ko*' | egrep '.*' && [ $? -eq 0 ])
23+
if [ -z "$kernel_module_check" ]; then
24+
# Install kernel modules for quota support.
25+
# Requires reboot to activate updated kernel.
26+
echo "Installing required kernel modules for quota support..."
27+
reboot_req="Y"
28+
apt-get -qq install linux-image-extra-virtual -y
29+
check_result $? "kernel module installation failed" $E_UPDATE
30+
fi
31+
2132
# Checking quota package
2233
quota=$(which --skip-alias --skip-functions quota 2>/dev/null)
2334
if [ $? -ne 0 ]; then
@@ -85,6 +96,7 @@ done
8596
#----------------------------------------------------------#
8697

8798
# Logging
99+
log_history "system quota enforcement enabled"
88100
log_event "$OK" "$ARGUMENTS"
89101

90102
exit

bin/v-delete-sys-quota

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ fi
6363
#----------------------------------------------------------#
6464

6565
# Logging
66+
log_history
67+
log_history "system quota enforcement disabled"
6668
log_event "$OK" "$ARGUMENTS"
6769

6870
exit

0 commit comments

Comments
 (0)