Closed etiennedub closed 1 month ago
@cmd-ntrf I can use this unless
instead that compare the user input with the limit currently set:
unless => "test \"$(numfmt --from=iec --to-unit=Ki $(echo ${quota} | tr '[:lower:]' '[:upper:]'))\" -eq \"$(xfs_quota -x -c 'report -N' /mnt/${volume_tag}/${volume_name} | grep root | awk '{print \$4}')\"",
But, it doesn't work in 2 scenarios:
Those are definitively edges cases and I don't know if we want to support those cases. @cmd-ntrf Any preference between this command and the file creation?
There were two issues with the previous exec command:
refreshonly=true
@cmd-ntrf To avoid executing the command at every execution, I create a file with the quota state. I haven't found a better way to verify the current quota but I'm open to a better alternative.