Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not too sure about creating it with user ownership. Don't know if it actually matters tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I'm not sure we should be creating it if it doesn't exist its probably better to just warn with a message saying iptables are not setup on this distro
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh if iptables actually being used then I think it's perfectly fine to create the directory, since there shouldn't really be a reason why it doesn't exist, so it can't hurt creating it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We ask for root permission/user at the start of the script, so I don't think it would be created under the user? But I can see the reasoning for just popping out a warning rather than creating the folder implicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea ur right, I should've actually looked at what the script's doing first, dunno why I assumed it wasn't doing permission elevation even if it clearly wouldn't work if it wasn't doing that. (Also I'm pretty sure you couldn't create the directory anyway if you weren't root.) Then I guess in that regard it's fine, not sure about whether just creating the directory or giving a warning for it is better tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is least intrusive operation, might be fine