-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
WIP: Shellcheck script files in initrd #862
base: master
Are you sure you want to change the base?
Conversation
@Thrilleratplay Waoooow!!!! Awesome initiative!!!! |
Is called from https://github.com/osresearch/heads/blob/624faa1a9d9c7794927757ff49fbb567d6d031fb/config/busybox.config#L954 while I implemented DHCP configuration here. |
@tlaurion Thank you for pointing out where it is referenced. I am going to make changes to |
Closing this in favor of #872 |
This is preferred approach over #872 (now closed). The logic behind this is that bash is not fully supported under busybox, even as of today, where having scripts declaring bash interpreter vs ash will be misleading. What changed (I think) since thn is that ASH is supported from shellcheck. This is actually DASH compliant, and we could get around shellcheck error SC2187 by doing either:
As reported there, having shellcheck check for dash vs ash will report errors saying that So the workaround would be something in the lines of (until either busybox is fully supporting bash or shellcheck is fully supporting ash):
As you see, nothing perfect again. The desired path is actually to have posix compliant scripts (where shellcheck currently complains for coding standards, but the scripts are compliant as of now). Discussion happening over #885. Cross-linking from there to here. |
/initrd
renamed with.sh
for consistency and simplifying shellcheck glob search.#!/bin/ash
shebangs are changed to#!/bin/sh
as shellcheck does not haveash
support.Resolve shellcheck errors:
To investigate:
/initrd/sbin/config-dhcp.sh
- variables not defined, does not seem to be functional.