Skip to content

Commit

Permalink
feat: Extract user host shell from /etc/passwd
Browse files Browse the repository at this point in the history
  • Loading branch information
matbme authored and axtloss committed Apr 18, 2024
1 parent c3380fb commit 5c83432
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes.container/usr/bin/host-shell
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ fi
if [ "$(basename "${0}")" != "host-shell" ]; then
host_command="$(basename "${0}")"
else
host_command="${1:-${SHELL:-/bin/sh}}"
host_shell=$(grep "^$USER" /run/host/etc/passwd | awk -F: '{print $NF}')
host_command="${1:-${$host_shell:-/bin/bash}}"
shift
fi

Expand Down

0 comments on commit 5c83432

Please sign in to comment.