Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more checks to scripts and output more system information #1456

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tdulcet
Copy link
Contributor

@tdulcet tdulcet commented Oct 25, 2018

Edit: This PR is now very outdated, but I would be happy to update it if there is ever interest in making these improvements.

  • Added more checks to scripts.
    • Check that the user is on Linux before, checking that they are on Ubuntu 14.04/18.04.
    • Check internet connectivity, before preforming network checks, etc..
    • Output warning if hostname is not a valid FQDN.
    • Added temporary message to direct Ubuntu 18.04 users to the corresponding branch.
    • Check if the IPv6 address is in the Spamhaus Block List, in addition to the IPv4 address. Display the reason the IP address is in the blacklist, if available.
  • Outputs more system information (for user verification and debugging).
  • Randomly generates a password for NONINTERACTIVE users that is more secure than 12345678.
  • Removed the use of many unnecessary commands.
    • Removed all uses of the lsb_release command, since it is not installed in all Linux distributions by default.
    • Removed all uses of the bc and expr commands, since Bash can do math natively.

This pull request was originally part of #1435.

@zatricky
Copy link
Contributor

zatricky commented Nov 1, 2018

Overall, I like it.

I personally like the section also where you're providing extra info like architecture/GPU/etc - just not sure if others would find it useful?

setup/preflight.sh Show resolved Hide resolved
setup/firstuser.sh Show resolved Hide resolved
@zatricky
Copy link
Contributor

zatricky commented Nov 1, 2018

@JoshData, I'm not sure of the stylistic choices you prefer. Please let us know. :)

@tdulcet
Copy link
Contributor Author

tdulcet commented Nov 1, 2018

@zatricky Thanks again for your review and feedback.

I personally like the section also where you're providing extra info like architecture/GPU/etc - just not sure if others would find it useful?

Almost all the extra system information was used is the script (Linux distribution, CPU cores, architecture, total RAM, total swap space, computer name and time zone), but was not output, which is why I said it is for "user verification". The rest (CPU, GPU, container and VM hypervisor) is useful for debugging and when users create issues.

The information is also interesting to know when you are deploying Mail-in-a-Box on an unfamiliar cloud VM.

@tdulcet
Copy link
Contributor Author

tdulcet commented Nov 3, 2018

@zatricky All your requested changes have been made in 8481305.

@zatricky
Copy link
Contributor

zatricky commented Nov 4, 2018

My only nitpick is the variable name for bit size. I like it overall. The rest is up to Josh. :)

@tdulcet tdulcet changed the title Added more checks to scripts and outputs more system information. Part of #1435 Added more checks to scripts and outputs more system information. Mar 2, 2021
@tdulcet tdulcet changed the title Added more checks to scripts and outputs more system information. Added more checks to scripts and output more system information Sep 16, 2023
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.

None yet

2 participants