Skip to content

Commit 12727de

Browse files
Merge pull request hestiacp#947 from Skamasle/patch-9
Exclude comments from fstab
2 parents 6fe10a3 + 6a3df38 commit 12727de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-add-sys-quota

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fi
3838

3939
# Adding group and user quota on /home partition
4040
mnt=$(df -P /home | awk '{print $6}' | tail -n1)
41-
lnr=$(cat -n /etc/fstab | awk '{print $1,$3}' | grep "$mnt$" | cut -f 1 -d ' ')
41+
lnr=$(cat -n /etc/fstab | grep -v "#" | awk '{print $1,$3}' | grep "$mnt$" | cut -f 1 -d ' ')
4242
opt=$(sed -n ${lnr}p /etc/fstab | awk '{print $4}')
4343
fnd='usrquota\|grpquota\|usrjquota=aquota.user\|grpjquota=aquota.group\|jqfmt=vfsv0'
4444
if [ $(echo $opt | tr ',' '\n' | grep -x $fnd | wc -l) -ne 5 ]; then

0 commit comments

Comments
 (0)