Skip to content

docs/ci: refresh README help; add lint; fix ShellCheck; guard /etc/inittab fallback#292

Open
VerdantE1 wants to merge 3 commits intoryran:masterfrom
VerdantE1:master
Open

docs/ci: refresh README help; add lint; fix ShellCheck; guard /etc/inittab fallback#292
VerdantE1 wants to merge 3 commits intoryran:masterfrom
VerdantE1:master

Conversation

@VerdantE1
Copy link

@VerdantE1 VerdantE1 commented Dec 26, 2025

For commit f3f166a

  • Update README minimal help snippet to match current xsos -h output (v0.7.40)
  • Document local lint commands in CONTRIB.md
  • Add GitHub Actions workflow to run bash -n and shellcheck (errors only)

- Update README minimal help snippet to match current xsos -h output (v0.7.40)
- Document local lint commands in CONTRIB.md
- Add GitHub Actions workflow to run bash -n and shellcheck (errors only)
Avoid noisy 'No such file or directory' when /etc/inittab is absent by only reading it if present/readable.
@VerdantE1
Copy link
Author

For commit 2109939:

  • Guard the /etc/inittab fallback with a readability check to avoid noisy errors when /etc/inittab is absent.
    Test:bash -n xsos && ./xsos >/dev/null

Why

  • On modern Linux distributions (e.g., Ubuntu 22.04+, CentOS 8+, Debian 10+), the /etc/inittab file no longer exists because they use systemd instead of SysV init. This commit adds a simple guard: only read /etc/inittab if it exists and is readable. This eliminates the spurious error while preserving functionality on legacy systems that still have the file.

Changes

  • Wrap /etc/inittab access with [ -f /etc/inittab ] && [ -r /etc/inittab ] check
  • No change to output logic—just avoids attempting to read a non-existent file

@VerdantE1
Copy link
Author

For commit 11cb227:

  • Fix ShellCheck error-level findings (SC2068/SC2071) by quoting array expansions / using numeric comparisons, so CI passes.

@superjamie
Copy link
Collaborator

Thank you, this looks really good!

I'm currently on holiday. I will review this with intention to merge when I get back in Feb.

@VerdantE1 VerdantE1 changed the title docs: refresh README help; add CI lint docs/ci: refresh README help; add lint; fix ShellCheck; guard /etc/inittab fallback Dec 26, 2025
@VerdantE1
Copy link
Author

Thank you, this looks really good!

I'm currently on holiday. I will review this with intention to merge when I get back in Feb.

Thanks! Enjoy your holiday 😊

@superjamie
Copy link
Collaborator

In your docs commit you appear to have removed parsing of the ss and firewall options. Please don't remove those.

As you are fixing up that commit anyway, please also don't add the extra whitespace in the bash-completion file.

I am not sure why the 4th commit is there. It looks to be just a Merge commit adding the same changes again? If so, there is no need for that commit, just the three commits which make the changes.

The other things look okay and ready to merge, good work.

(I am not familiar with Gitub CI but the yaml makes sense)

@VerdantE1 VerdantE1 force-pushed the master branch 2 times, most recently from f7fb32d to 8a8678d Compare February 9, 2026 08:01
@VerdantE1
Copy link
Author

I've updated the PR as requested:

  • Restored the ss and firewall parsing options in the documentation.
  • Cleaned up the extra whitespace in the bash-completion file.
  • Rebased and squashed the history into 3 clean commits (removed the extra merge commit).
    Thanks for the guidance, please let me know if there's anything else!

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