Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Autoprompt root passwd #133

Closed

Conversation

timmypidashev
Copy link
Contributor

@timmypidashev timmypidashev commented Mar 29, 2022

Status

  • Ready

Issue

RE #130

Summary

Password prompts throughout the installation can be a hassle and in the case of Arch-based distros, time out the shell script entirely. This branch caches the users root password prior to running the script, and then uses it throughout the script until complete.

Tasks

  • Cache and use root passwd(distro-dependent)
  • Integrate directly into system.sh
  • Fix Arch issues
  • Password validity check
  • Test

@timmypidashev
Copy link
Contributor Author

Works well, but the problem now is getPassword is doing 2 major things:

  • Caching root password
  • Updating system packages

This isn't exactly what I would call good organization, on the contrary its rather messy. Best solution would be to integrate getPassword directly into the installDependencies command. This would be more seameless as $DISTRO would only be called once, etc.

@timmypidashev
Copy link
Contributor Author

Ok moved everything away and into system.sh. Running installDependencies issues a check for $PASSWD. This can be an issue further along the installation though, will test to validate.

@timmypidashev
Copy link
Contributor Author

timmypidashev commented Mar 29, 2022

Ok so now most everything works, at least Debian and Fedora should have no issues. Arch on the other hand is picky. I managed to get yay to save priveleges for the extent of the installation, but running chrooted commands under an Arch installation will fail since $PASSWD was completely ignored in the process. Will take a break and hopefully a fresh idea that makes sense will come to mind.

@timmypidashev
Copy link
Contributor Author

Ok everything works, but there are several gripes. For one thing there still is no password validity check, so wrong password = fatal error, and arch install requires the password prompt to be typed in twice. On top of that, the system goes through a package update process, not sure if this is something that should be ran initially(can remove if its not needed, as it was mainly an excuse to get yay to save the password to cache).

@timmypidashev
Copy link
Contributor Author

Well there are a lot of issues in the arch variant. Debian should run fine(I haven't yet accounted for any sudo actions in extract/bootstrap/distros/* yet though)

@timmypidashev
Copy link
Contributor Author

Getting the password and using it correctly with shell is a huge pain. I'm thinking to drop this pr as it is getting unnecessarily complicated, and since the previous discussion in #130, @MilkyDeveloper you noted using python is an option. Although that is a question of its own, and shouldn't be in the works as of yet, I think it's best to just leave this issue for later and implement this in a python/put-lang-here variant. I will open a discussion of migrating to a python codebase, along with a list of growing issues to switch. Once audio, and other issues are fixed, and if the focus does become a more stable, crossplatform installer, then we might get this all fixed.

@timmypidashev timmypidashev mentioned this pull request Apr 27, 2022
11 tasks
@timmypidashev timmypidashev deleted the feature/auto-prompt branch May 4, 2022 17:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant