Skip to content

Add option to easyinstall to support the "pi-gen" tool#1107

Merged
akuker merged 1 commit intodevelopfrom
feature_pi_gen_installer
Feb 27, 2023
Merged

Add option to easyinstall to support the "pi-gen" tool#1107
akuker merged 1 commit intodevelopfrom
feature_pi_gen_installer

Conversation

@akuker
Copy link
Copy Markdown
Member

@akuker akuker commented Feb 25, 2023

The "pi-gen" tool is used to generate the pre-built piscsi images. Some of the commands of option (1) in easyinstall.sh are causing errors when pi-gen runs. For example, systemd isn't running in the chroot environment while the image is being built, so the systemctl status commands fail.

Comment on lines +90 to +95
# Only to be used for pi-gen automated install
function cacheSudo() {
echo "Caching sudo password"
echo raspberry | sudo -v -S
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Couldn't this be useful for all users? F.e. when running very time consuming compilation processes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It will only work if they haven't changed the default password. Everyone SHOULD be changing the default password, so, I propose leaving it restricted to the pi-gen use case.

Comment on lines +1369 to +1370
echo "Hidden setup mode for running the pi-gen utility"
echo "This shouldn't be used by normal users"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this only bypassing systemd operations? I wonder if it would be possible to make a universal script that checks for systemd support first.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Potentially. I'm thinking there might be more pi-gen specific functions I need to add though. I'm trying to integrate pi-gen with Github actions. (Then I can be lazy and don't need to do the releases anymore! :) )

@akuker akuker merged commit 059a31b into develop Feb 27, 2023
@akuker akuker deleted the feature_pi_gen_installer branch February 27, 2023 02:29
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