fix: an /etc/appname without a trailing newline still names the appliance #20

Merged
marcos-mendez merged 1 commit from fix/appname-no-newline into master 2026-10-02 01:06:57 -03:00
marcos-mendez commented 2026-10-02 00:53:44 -03:00 (Migrated from github.com)

00-keel-banner read /etc/appname with read -r name < "$KEEL_APPNAME_FILE" || name="". read exits non-zero on a last line with no newline even though it read it, so such a file produced an empty name. It is now || [ -n "$name" ].

Test plan

  • tests/banner.bats: two new tests run the drop-in itself with an appname file with and without a trailing newline. The second failed before the fix and passes after it. 98/98 pass.
  • CI
`00-keel-banner` read `/etc/appname` with `read -r name < "$KEEL_APPNAME_FILE" || name=""`. `read` exits non-zero on a last line with no newline even though it read it, so such a file produced an empty name. It is now `|| [ -n "$name" ]`. ## Test plan - [x] `tests/banner.bats`: two new tests run the drop-in itself with an appname file with and without a trailing newline. The second failed before the fix and passes after it. 98/98 pass. - [ ] CI
Sign in to join this conversation.
No description provided.