Skip to content

Commit

Permalink
quotas for al8/9
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Sep 17, 2024
1 parent 5dda970 commit b63070f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,18 @@ def edit_fstab(self,mount_point, options_to_add):

print(parts)
try:
if parts[1] == '/' and parts[3].find('usrquota,grpquota') == -1:
if parts[1] == '/' and parts[3].find('usrquota,grpquota') == -1 and len(parts[3]) > 4:
parts[3] = f'{parts[3]},usrquota,grpquota'
finalString = '\t'.join(parts)
print(finalString)
WriteToFile.write(finalString)
elif parts[1] == '/':
for ii, p in enumerate(parts):
if p.find('defaults') > -1:
parts[ii] = f'{parts[ii]},usrquota,grpquota'
finalString = '\t'.join(parts)
print(finalString)
WriteToFile.write(finalString)
else:
WriteToFile.write(line)
except:
Expand Down

0 comments on commit b63070f

Please sign in to comment.