Tritt ihm auf die Füße 😉
Doch, in diesem Fall ist genau das Problem, das alaun eine Login Shell startet.
Test:
Mache dir ein Skript in /tmp/t.sh
#!/bin/bash
#
id
echo $PATH
Mach das ausführbar, chmod +x /tmp/t.sh
Dann starte als Normaluser dieses Skript, so wie aluun das auch macht:
su - -c /tmp/t.sh
und achte auf die Ausgabe vom Path.
Zum Vergleich starte das mal mit:
su -c /tmp/t.sh
info su gibt die Erklärung:
`--login'
Make the shell a login shell. This means the following. Unset all
environment variables except `TERM', `HOME', and `SHELL' (which
are set as described above), and `USER' and `LOGNAME' (which are
set, even for the super-user, as described above), and set `PATH'
^^^^^^^^^^^^^^^^
to a compiled-in default value. Change to USER's home directory.
^^^^^^^^^^^^^^^^^^^^
Prepend `-' to the shell's name, intended to make it read its
login startup file(s).
Der Fehler entsteht, daß durch -c keine Shell gestartet wird, also die $shell.rc bzw. profile
von /root nicht eingelesen wird.
Der Author müßte die relevaten Pfade im alunn_updatescript definieren.
Oder halt nicht als login-Shell starten.
Also beißen sich hier -login und -c