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

nixos: Minimize activation script debug, add debugging, and more #85

Merged
merged 3 commits into from
Mar 1, 2022

Conversation

talyz
Copy link
Collaborator

@talyz talyz commented Feb 16, 2022

nixos: Minimize the amount of text added to the activation script

This is done to reduce the risk of build errors, isolate each run of the script and reduce the amount of replicated code.

  • Make the file mount script generated by mkMountScript a discrete script and only generate its invocations.

  • Wrap the script invocations in scripts.

Fixes #77, #78

nixos: Add an internal debugging option to aid script debugging

This should let users provide detailed traces of script errors.

create-directories: Set noglob and inherit_errexit, document options

In addition to the currently set bash options, set noglob and inherit_errexit.

  • noglob disables filename expansion, which could happen in the for loop where we do path splitting if the path contains characters recognized by bash as wildcards, such as ? or *.

  • inherit_errexit makes subshells inherit the status of the errexit option.

In addition to the currently set bash options, set `noglob` and
`inherit_errexit`.

- `noglob` disables filename expansion, which could happen in the for
  loop where we do path splitting if the path contains characters
  recognized by bash as wildcards, such as `?` or `*`.

- `inherit_errexit` makes subshells inherit the status of the
  `errexit` option.
This is done to reduce the risk of build errors, isolate each run of
the script and reduce the amount of replicated code.

- Make the file mount script generated by `mkMountScript` a discrete
  script and only generate its invocations.

- Wrap the script invocations in scripts.
@talyz talyz changed the title Minimize activation script debug nixos: Minimize activation script debug, add debugging, and more Feb 16, 2022
@talyz talyz merged commit 2f39bae into master Mar 1, 2022
@talyz talyz deleted the minimize-activation-script-debug branch March 1, 2022 10:44
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.

Kernel panic resulting from a possible precedence issue
1 participant