fwupd: shutdown hook fails with exit status 1 because /bin/sh is unavailable
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- devops
Research direction
Start with the Nixpkgs fwupd package expression at pkgs/by-name/fw/fwupd/package.nix and the upstream hook linked in the issue. Check how the package installs fwupd.shutdown and how NixOS provides the runtime shell. Done means the installed hook uses an interpreter available during shutdown; the issue reports that changing its shebang to ${pkgs.runtimeShell} fixes the error.
Written by the indexing model from the issue text.
Description
Describe the bug
The fwupd 2.1.9 shutdown hook starts with #!/bin/sh. On NixOS, shutdown can unmount /bin before executing systemd shutdown hooks. The console then reports that fwupd.shutdown failed with exit status 1.
Upstream hook.
Nixpkgs package source.
Steps to reproduce
- Enable
services.fwupd.enable = true;on NixOS. - Build and activate the configuration.
- Inspect the installed
fwupd.shutdownhook: its interpreter is/bin/sh. - Shut down using
systemctl poweroff. - Observe the console message:
fwupd.shutdownfailed with exit status 1.
The shutdown journal records Unmounted /bin. before Shutting down.. The hook error appears on the console after journald stops.
Expected behaviour
Patch the installed shutdown hook to use an interpreter in the Nix store that remains available during shutdown.
Workaround and validation
Replacing only #!/bin/sh with #!${pkgs.runtimeShell} fixes the shutdown error. The rest of the hook, including firmware activation, is unchanged.
The system build passed. After activating the patched configuration and testing shutdown, the console error no longer appeared.
- Dominant language
- Nix
- Stars
- 26.8k
- Forks
- 20.7k
- Avg merge
- 6h 55m
- Merged PRs (30d)
- 535
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NixOS/nixpkgs
-
0.kind: bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
0.kind: build failure
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
NixOS/nixpkgs#587434 · 1 comment ·
Maintainers usually reply within 1 day
-
0.kind: enhancement 9.needs: package (update)
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
NixOS/nixpkgs#587416 · 1 reaction ·
Maintainers usually reply within 1 day
-
1.severity: security
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
Similar issues
-
triage/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cozystack/cozystack#5300 · 1 reaction ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
fullsend-ai/fullsend#9404 ·
Maintainers usually reply within 1 day
-
bug github_actions ready-for-triage triaged
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
konflux-ci/multi-platform-controller#1179 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
zizmorcore/zizmor-action#195 · 2 comments ·
Maintainers usually reply within 1 day
-
🐛 The Rulekeeper - An index run that gives up on the lock ends SucceededPossibly taken @github-actions claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SSWConsulting/SSW.Rules#2809 · 1 comment ·
Maintainers usually reply within 1 day