More installer issues
Summary
The installer script makes certain assumptions which may not always be true.
Steps to reproduce
Run the installer script in a way not originally anticipated.
Expected behavior
Behave gracefully.
Problematic behavior
- If curl is not already installed (e.g: if the user downloads and runs the script not as recommended) the installer will fail.
- If swap space already exists and the script runs as a new install it will possibly create additional unecessary swap. It creates the swap space with not-recommended permissions and can write duplicate fstab entries.
- If the daemon is not already installed/running the user could be confused by the error message when it fails to stop.
- The script writes the crontab line even if it already exists.
- The script doesn't actually delete the tmpdir where the installer image is downloaded and unzipped.
- Inconsistent use of sudo. If run as non-root user the script can fail in several places.
Crown-core environment info
linux
Crown-core application info
v0.12.5.1
Relevant logs and/or screenshots
Possible fixes
- Add curl to the inbuilt dependency installation.
- Don't create swap unless necessary and only add the line to fstab once.
- Quietly stop the daemon.
- Fix permissions on swap.
- Use sudo consistently and everywhere it might be needed.
- Write crontab entry only once.
- Delete the actual tmpdir when finished.
/cc @finjosh
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information