Skip to content

Commit 6a3df38

Browse files
authored
Exclude comments
In ubuntu and debian, by default are some comments including partition and script get creazy I explain problem here ( ithink affect only debian ) outroll/vesta#844 I think nothing get broken, in may test working, ( debian 7 ) I try exclude # before all test but cat -n add numbers and not found any orther solution.
1 parent e4b4b8c commit 6a3df38

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)