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

Abort installation if user is not "pi" #2076

Merged
merged 5 commits into from
Oct 10, 2023

Conversation

AlvinSchiller
Copy link
Collaborator

For new RaspberryPi OS installations the user can freely choose a username. This is currently not supported due to many files that have user "pi" and home "/home/pi" hardcoded. See #1785

Added a validation to the installscript that checks the current user and home.
Only if the user is "pi" and home is "/home/pi" the installation will proceed, otherwise it will be aborted with an error message.
This should prevent upcoming issues during runtime until a proper solution to support a different username is implemented.

The test scripts have also been updated and harmonized and unnecessary duplicates (for a different user) have been removed.
Also the workflow files have been harmonized and buster, bullseye and altuser runs are now active on pushs, to validate changes.

retrieve correct information even if called with sudo
docker env USER added.
var USER is not exported by default.

test installation script now uses current user and home from env.
removed duplicate test script for alternative user.
activated test2 for buster
Only run once at 5, not every minute
@s-martin s-martin added this to the 2.5 milestone Oct 10, 2023
@s-martin s-martin merged commit 7253971 into MiczFlor:develop Oct 10, 2023
12 checks passed
@AlvinSchiller AlvinSchiller deleted the fix/usernotpi branch October 10, 2023 19:45
AlvinSchiller added a commit to AlvinSchiller/RPi-Jukebox-RFID that referenced this pull request Dec 21, 2023
* check for user 'pi' and home '/home/pi'
retrieve correct information even if called with sudo

* use correct user in docker and test scripts.

docker env USER added.
var USER is not exported by default.

test installation script now uses current user and home from env.
removed duplicate test script for alternative user.

* check and handle installation exitcode

* harmonize workflow trigger.
activated test2 for buster

* fix cron schedule.

Only run once at 5, not every minute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants