Skip to content

Commit

Permalink
init: fix ash shell package detection, Fix #247
Browse files Browse the repository at this point in the history
Signed-off-by: 89luca89 <luca.dimaio1@gmail.com>
  • Loading branch information
89luca89 committed May 12, 2022
1 parent a20d0b0 commit 0d01191
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions distrobox-init
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ printf "distrobox: Installing basic packages...\n"
# Extract shell name from the $SHELL environment variable
# If not present as package in the container, we want to install it.
shell_pkg="$(basename "${SHELL:-"bash"}")"
# Ash shell is an exception, it is not a standalone package, but part of busybox.
# for this reason, use this quirk to adjust the package name.
if [ "${shell_pkg}" = "ash" ]; then
shell_pkg="busybox"
fi

# Check if dependencies are met for the script to run.
if ! command -v find || ! command -v mount || ! command -v passwd ||
! command -v sudo || ! command -v useradd || ! command -v diff ||
Expand Down

0 comments on commit 0d01191

Please sign in to comment.