[Git-commits] [grml/grml-live] ddcd5d: config: convert grml-autoconfig system from zsh to...

Chris Hofstaedtler noreply at github.com
Sat Jun 21 11:51:23 CEST 2025


  Branch: refs/heads/zeha/bash
  Home:   https://github.com/grml/grml-live
  Commit: ddcd5d3d804735b0412a312da990d439a3f1b3ee
      https://github.com/grml/grml-live/commit/ddcd5d3d804735b0412a312da990d439a3f1b3ee
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/usr/bin/restore-config
    M config/files/GRMLBASE/usr/bin/save-config
    M config/files/GRMLBASE/usr/share/grml-autoconfig/autoconfig.functions
    M config/files/GRMLBASE/usr/share/grml-autoconfig/grml-autoconfig

  Log Message:
  -----------
  config: convert grml-autoconfig system from zsh to bash

Convert the entire grml-autoconfig system (restore-config, save-config,
autoconfig.functions, and grml-autoconfig) from zsh to bash for better
portability and shellcheck compatibility.

Key conversion changes:
- Replace zsh-specific syntax with bash equivalents:
  * [[ pattern == *match* ]] → case statements
  * zparseopts → manual argument parsing
  * ${=variable} word splitting → standard bash
  * |& redirection → 2>&1 | for compatibility
  * pipestatus[1] → PIPESTATUS[0]

- Remove zsh dependencies:
  * Remove iszsh() function and setopt calls
  * Replace zsh math functions with bash arithmetic
  * Simplify signal trapping with proper signal names

- Fix color system integration:
  * Use $GREEN/$BLUE/$NORMAL from grml_colors
  * Maintain original color scheme in usage messages
  * Preserve grml visual identity

- Add shellcheck source directives:
  * Help shellcheck understand file relationships
  * Enable static analysis of sourced files

All scripts maintain full backward compatibility while gaining shellcheck
coverage and improved portability across shell implementations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply at anthropic.com>


  Commit: f7a32d7316388df3d05dae1f283385f1a4b58781
      https://github.com/grml/grml-live/commit/f7a32d7316388df3d05dae1f283385f1a4b58781
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/usr/bin/save-config

  Log Message:
  -----------
  save-config: initialize DEBUG variable

Fix "integer expression expected" error by initializing DEBUG=0
at the start of the script. The debug function expects DEBUG to be
a number for the -gt comparison, but it was never set.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply at anthropic.com>


  Commit: a711d36eddadb31205b8ea0afd465fae554385d8
      https://github.com/grml/grml-live/commit/a711d36eddadb31205b8ea0afd465fae554385d8
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/etc/grml/autoconfig
    M config/files/GRMLBASE/etc/grml/autoconfig.local
    M config/files/GRMLBASE/usr/bin/restore-config
    M config/files/GRMLBASE/usr/bin/save-config
    M config/files/GRMLBASE/usr/share/grml-autoconfig/autoconfig.functions
    M config/files/GRMLBASE/usr/share/grml-autoconfig/grml-autoconfig

  Log Message:
  -----------
  config: fix shellcheck issues across all autoconfig scripts

Fix numerous shellcheck warnings and errors in the grml-autoconfig system:

Core fixes:
- Replace signal numbers with names (INT TERM SEGV)
- Fix deprecated egrep usage (use grep -E)
- Add proper quoting for variables and paths
- Separate variable declaration from assignment
- Fix cd commands with error handling (|| exit/continue)
- Replace legacy backticks with $(...) command substitution
- Fix parameter expansion quoting patterns
- Replace fragile for loops over find with while read

Script-specific improvements:
- save-config: Fix command substitution and error handling in subshells
- autoconfig.functions: Add shellcheck disable for intentionally unused variables
- All scripts: Add shellcheck source directives for proper analysis
- Preserve $EXTRACTOPTIONS word splitting behavior where needed

Maintains all functionality while improving shell script best practices
and enabling comprehensive static analysis coverage.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply at anthropic.com>


  Commit: 77a18566a366285ce0b62b9bbe2af63eb953d478
      https://github.com/grml/grml-live/commit/77a18566a366285ce0b62b9bbe2af63eb953d478
  Author: Chris Hofstaedtler <chris.hofstaedtler at deduktiva.com>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/usr/share/grml-autoconfig/autoconfig.functions

  Log Message:
  -----------
  autoconfig.functions: drop start of obsolete haveged, rmnologin services


  Commit: 237f24dff9bcda9dc97db6a7d7a0ffd0981c8757
      https://github.com/grml/grml-live/commit/237f24dff9bcda9dc97db6a7d7a0ffd0981c8757
  Author: Chris Hofstaedtler <chris.hofstaedtler at deduktiva.com>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/usr/share/grml-autoconfig/autoconfig.functions

  Log Message:
  -----------
  autoconfig.functions: remove unreachable startx code block


  Commit: 53f687559f6e63cd59aca74e06406b494fa1328d
      https://github.com/grml/grml-live/commit/53f687559f6e63cd59aca74e06406b494fa1328d
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/usr/share/grml-autoconfig/autoconfig.functions

  Log Message:
  -----------
  autoconfig.functions: appease shellcheck

And probably fix testcd.


  Commit: e18fe556992841632b03f08546833c63c032ec27
      https://github.com/grml/grml-live/commit/e18fe556992841632b03f08546833c63c032ec27
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/lib/brltty/brltty.sh

  Log Message:
  -----------
  brltty.sh: appease shellcheck


  Commit: 98aa8c02c17a83f1c54ec21ae0051effd982906f
      https://github.com/grml/grml-live/commit/98aa8c02c17a83f1c54ec21ae0051effd982906f
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/hooks/ZFS/instsoft

  Log Message:
  -----------
  ZFS/instsoft: appease shellcheck


  Commit: 0c6bd0f673fe268b3e934d6249b51ee7b8ea7a38
      https://github.com/grml/grml-live/commit/0c6bd0f673fe268b3e934d6249b51ee7b8ea7a38
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/scripts/GRMLBASE/26-console-setup

  Log Message:
  -----------
  GRMLBASE/26-console-setup: appease shellcheck


  Commit: c71e15ac780dd3b304c7bda9cb96e9d7277e6e58
      https://github.com/grml/grml-live/commit/c71e15ac780dd3b304c7bda9cb96e9d7277e6e58
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/etc/udev/scripts/grml-udev-rebuildfstab

  Log Message:
  -----------
  grml-udev-rebuildfstab: appease shellcheck


  Commit: a8c8e197a494e4ffcd1a2321ede43a62a48f20cd
      https://github.com/grml/grml-live/commit/a8c8e197a494e4ffcd1a2321ede43a62a48f20cd
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/etc/udev/scripts/forensic-mark-readonly

  Log Message:
  -----------
  forensic-mark-readonly: appease shellcheck


  Commit: 467a3c480da942774d4a601956b1306043ceb6f7
      https://github.com/grml/grml-live/commit/467a3c480da942774d4a601956b1306043ceb6f7
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/usr/share/initramfs-tools/scripts/init-top/grml

  Log Message:
  -----------
  init-top/grml: appease shellcheck


  Commit: 5a078804235c8c24e31dfaf658fc8c6bf79e5f1a
      https://github.com/grml/grml-live/commit/5a078804235c8c24e31dfaf658fc8c6bf79e5f1a
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/usr/sbin/grml-setlang

  Log Message:
  -----------
  grml-setlang: appease shellcheck


  Commit: 69ffb6385aefd792267b14935916f177aae13ba2
      https://github.com/grml/grml-live/commit/69ffb6385aefd792267b14935916f177aae13ba2
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/usr/sbin/grml-autoconfig

  Log Message:
  -----------
  grml-autoconfig: appease shellcheck


  Commit: 40a0860c850e22e9e0bdd3219d6e17ec4a750062
      https://github.com/grml/grml-live/commit/40a0860c850e22e9e0bdd3219d6e17ec4a750062
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M .github/workflows/pr-review.yml
    M debian/update-grml-live-version

  Log Message:
  -----------
  workflows: simplify shellcheck with directory-based execution

Replace reviewdog with direct shellcheck execution to improve reliability:

- Remove reviewdog dependency (not working reliably for PR comments)
- Run shellcheck from each file's directory to resolve relative paths
- Expand coverage to all shell scripts in the repository
- Fix shellcheck warning in debian/update-grml-live-version
- Combine main and test script checking into single job
- Ensure shellcheck source directives work correctly

This provides reliable shellcheck execution with clear console output
and proper path resolution for all files.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply at anthropic.com>


  Commit: 1a54e4950c4cddd11675b4a8e2778b363ebe292c
      https://github.com/grml/grml-live/commit/1a54e4950c4cddd11675b4a8e2778b363ebe292c
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-21 (Sat, 21 Jun 2025)

  Changed paths:
    M .github/workflows/pr-review.yml
    A tests/autoconfig/.gitignore
    M tests/autoconfig/common_tests
    M tests/autoconfig/run_tests.sh
    M tests/autoconfig/test_bootparameters.sh
    M tests/autoconfig/test_dcsdir.sh
    M tests/autoconfig/test_debs.sh
    M tests/autoconfig/test_grmlcfg.sh

  Log Message:
  -----------
  Enable grml-autoconfig shunit2 tests


Compare: https://github.com/grml/grml-live/compare/a8265177ea02...1a54e4950c4c

To unsubscribe from these emails, change your notification settings at https://github.com/grml/grml-live/settings/notifications


More information about the Git-commits mailing list