mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -07:00
Merge pull request #947 from Skamasle/patch-9
Exclude comments from fstab
This commit is contained in:
commit
12727de879
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ fi
|
||||||
|
|
||||||
# Adding group and user quota on /home partition
|
# Adding group and user quota on /home partition
|
||||||
mnt=$(df -P /home | awk '{print $6}' | tail -n1)
|
mnt=$(df -P /home | awk '{print $6}' | tail -n1)
|
||||||
lnr=$(cat -n /etc/fstab | awk '{print $1,$3}' | grep "$mnt$" | cut -f 1 -d ' ')
|
lnr=$(cat -n /etc/fstab | grep -v "#" | awk '{print $1,$3}' | grep "$mnt$" | cut -f 1 -d ' ')
|
||||||
opt=$(sed -n ${lnr}p /etc/fstab | awk '{print $4}')
|
opt=$(sed -n ${lnr}p /etc/fstab | awk '{print $4}')
|
||||||
fnd='usrquota\|grpquota\|usrjquota=aquota.user\|grpjquota=aquota.group\|jqfmt=vfsv0'
|
fnd='usrquota\|grpquota\|usrjquota=aquota.user\|grpjquota=aquota.group\|jqfmt=vfsv0'
|
||||||
if [ $(echo $opt | tr ',' '\n' | grep -x $fnd | wc -l) -ne 5 ]; then
|
if [ $(echo $opt | tr ',' '\n' | grep -x $fnd | wc -l) -ne 5 ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue