Quote:
Originally Posted by Booxtor
could you please check it?
|
I can't claim even a fraction of kodomo's competence, but to my eye this script does just what he described as a bad idea - it monitors free space on /root/ and if there is less than 1024 bytes left it recursively deletes one of the files/directories defined in "root_files" - including notes. So now the chance that user notes are deleted drops a little (depending on which file the free space condition is met - if user's note-taking activity causes free space to drop below 1024 bytes, then notes are lost), but still is not eliminated (why doesn't the script try to copy the notes to some other partition first?). This solution really looks like an attempt to punish the user for taking notes. I also don't like how conditional statement is written - in an unlikely event df, grep or awk commands fail to produce a meaningful result, user notes may be deleted as well.