Skip to content

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)

VerdantE1 and others added 4 commits December 26, 2025 18:10
- 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.
fix: avoid "No such file" error for /etc/inittab on systemd systems
@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 😊

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