Skip to content

add root_user variable #59

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

Merged
merged 4 commits into from
Feb 17, 2025
Merged

add root_user variable #59

merged 4 commits into from
Feb 17, 2025

Conversation

james-bruten-mo
Copy link
Contributor

While reviewing the linter ticket I realised that some commands in the kgo scripts were hardcoded to frum instead of using umadmin as they are on azspice. This ticket fixes that.

@james-bruten-mo james-bruten-mo requested review from a team, ericaneininger and mo-nikosbaltas and removed request for a team January 31, 2025 17:07
Copy link
Contributor

@ericaneininger ericaneininger left a comment

Choose a reason for hiding this comment

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

This looks fine to me.
There are a couple of comments in the file which still specify "frum" where perhaps they shouldn't now, but functionally this is fine.
Examples at L9, L126, L145

@t00sa t00sa requested review from t00sa and removed request for mo-nikosbaltas February 14, 2025 16:12
Copy link
Contributor

@t00sa t00sa left a comment

Choose a reason for hiding this comment

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

I agree with Erica that this wants a bit more tidying up. I'd suggest the following:

  • Move L148 to after L32 to define root_user=frum
  • Move L151 to after L24 to define root_user="umadmin"

Then do a wholesale search-and-replace to swap frum and umadmin for ${root_user}.

It may also make sense to use this as an opportunity to set another variable in the same initial section between L22 and L33 to define an install directory for each platform, e.g. root_home=/home/users/${root_user}, and replace any hardwired referenced to the home directory. This future-proofs the script in the event that we decide we need to remove the explicit username references.

@james-bruten-mo
Copy link
Contributor Author

Cheers Sam, done those. There's definitely tidying that could be done for the root_home still, but they're not simple copy and pastes so I'll leave for slower time. Any actual refactor would be better left until we've removed old platforms I think.

Copy link
Contributor

@t00sa t00sa left a comment

Choose a reason for hiding this comment

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

Thank you! Changes look good to me.

@t00sa t00sa merged commit 733d42f into main Feb 17, 2025
3 checks passed
@t00sa t00sa deleted the fix_root_user branch February 17, 2025 10:27
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.

3 participants