Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@drwetter
Copy link

@drwetter drwetter commented Mar 2, 2020

Thanks for the script.

I made the script more usable:

  • clamdscan maybe isn't installed)
  • lockfile wasn't installed under Debian. You can as well remove that line as it is not used in the script
  • tmpdir generation maybe had a race condition = security problem due to foreseeable filename.

Under bash one can use [[ ]] instead of []. One should use POSX notation $(expression) instead of expression.

It works for me. You might want to double check though.

Thanks for the script.

I made the script more usable:
  *  clamdscan maybe isn't installed)
  * lockfile wasn't installed under Debian. You can as well remove that line as it is not used in the script
  * tmpdir generation maybe had a race condition = security problem due to foreseeable filename.

Under bash one can use [[ ]] instead of []. One should use POSX notation $(expression) instead of `expression`.

It works for me. You might want to double check though.
Copy link

@mkilijanek mkilijanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change assumes usage of Bash as shell. On Linux it might be true, but on e.g. FreeBSD Bash is not installed at all by default. Using Bash only syntax limits usage of script to Linux only. More specific: to Linux only run from user context, not by scripting shell. Even Dash (Debian default scripting shell) is not supporting Bashisms.

@drwetter
Copy link
Author

err... see first line.

@mkilijanek
Copy link

@abusech can you clarify if your shell script should work under Bash only or be platform independent? Can you clarify what is your take on that matter, to avoid confusion? Should we use Bash or be POSIX complaint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants