[Git-commits] [grml/grml-scripts] 570d95: Set SHELL variable in run-welcome + run-screen

Michael Prokop noreply at github.com
Fri Nov 25 09:57:43 CET 2022


  Branch: refs/heads/master
  Home:   https://github.com/grml/grml-scripts
  Commit: 570d9599584feb8ff7ccc8a9abe346c356f62c45
      https://github.com/grml/grml-scripts/commit/570d9599584feb8ff7ccc8a9abe346c356f62c45
  Author: Darshaka Pathirana <dpat at syn-net.org>
  Date:   2022-11-13 (Sun, 13 Nov 2022)

  Changed paths:
    M usr_share/run-screen
    M usr_share/run-welcome

  Log Message:
  -----------
  Set SHELL variable in run-welcome + run-screen

By default login(1) is called by agetty(8) and sets the SHELL variable
"according to the appropriate fields in the password entry".

Our tty1 calls run-welcome, tty2 - tty4 call run-screen and tty5 - tty7 call
agetty (with autologin grml). So, our tty1 - tty4 bypass agetty(8) + login(1)
and (should) end in a the zsh shell (via the welcome-screen or GNU/screen)
without the SHELL variable set.

run-welcome is designed to be started (only) on tty(1) and starts zsh anyway.
But as we bypass login(1) the SHELL variable is not set.
The same is true for run-screen, but instead of starting the zsh as
login-shell, `screen` is called and runs the shell defined by the SHELL
variable or /bin/sh if not defined.

So, we ended up using the systemd "Environment"-option to set the SHELL
variable (grml/grml-live at 6871972 + grml/grml-live at 7422d31).
Although this is a working solution, setting the SHELL variable in run-welcome
+ run-screen makes it more transparent, that the script is actually responsible
to set the SHELL variable.

While debugging this problem, also noticed that screen should start the shell
as login-shell (like all other ttys). To do so the given shell command needs to
be prefixed with the '-' character.

grml/grml-live at 6871972 + grml/grml-live at 7422d31 can/should be reverted
after this change has been applied.

Issues: grml/grml#135 + grml/grml#14


  Commit: 10fcde779a5ff842a841a1a86390f1b903e00139
      https://github.com/grml/grml-scripts/commit/10fcde779a5ff842a841a1a86390f1b903e00139
  Author: Michael Prokop <mika at grml.org>
  Date:   2022-11-25 (Fri, 25 Nov 2022)

  Changed paths:
    M usr_share/run-screen
    M usr_share/run-welcome

  Log Message:
  -----------
  Merge remote-tracking branch 'origin/github/pr/15'


  Commit: 168953e791d6fe6dd0203fe1fda085fba33a033d
      https://github.com/grml/grml-scripts/commit/168953e791d6fe6dd0203fe1fda085fba33a033d
  Author: Michael Prokop <mika at grml.org>
  Date:   2022-11-25 (Fri, 25 Nov 2022)

  Changed paths:
    M debian/changelog

  Log Message:
  -----------
  Release new version 2.12.0


Compare: https://github.com/grml/grml-scripts/compare/c1231da0db59...168953e791d6


More information about the Git-commits mailing list