diff --git a/Containerfile b/Containerfile index 7528e04..3b1f8f8 100644 --- a/Containerfile +++ b/Containerfile @@ -25,9 +25,9 @@ RUN cat /aussielunix_Root_CA_168848365996868199089383065266162030969.crt >> /etc && rm -f /aussielunix_Root_CA_168848365996868199089383065266162030969.crt # Patch /usr/bin/entrypoint -RUN sed -i '349,489 s/^/#/' /usr/bin/entrypoint && \ - sed -i '499,1355 s/^/#/' /usr/bin/entrypoint && \ - sed -i '1357 s/^/#/' /usr/bin/entrypoint +RUN sed -i '/missing_packages=0/,/# Workaround for when sudo is missing,/ s/^/#/' /usr/bin/entrypoint && \ + sed -i '/elif command -v apt-get/,/# Set SHELL to the install path inside the container/ s/^/#/' /usr/bin/entrypoint && \ + sed -i '/# Set SHELL to the install path inside the container/a touch /.containersetupdone' /usr/bin/entrypoint # Use and configure bash, retrieve bash-prexec RUN curl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o /tmp/bash-prexec && \ diff --git a/files/etc/profile.d/00-bluefin-cli-brew-firstrun.sh b/files/etc/profile.d/00-bluefin-cli-brew-firstrun.sh index 5e07496..3a2eaf9 100644 --- a/files/etc/profile.d/00-bluefin-cli-brew-firstrun.sh +++ b/files/etc/profile.d/00-bluefin-cli-brew-firstrun.sh @@ -2,6 +2,8 @@ if test "$(id -u)" -gt "0"; then green=$'\033[32m' bold=$'\033[1m' normal=$'\033[0m' + HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew + export HOMEBREW_REPOSITORY if test ! -f /etc/linuxbrew.firstrun; then printf "\nMyToolbox First Run Setup\n\n" printf "Setting up sudo for ${bold}${USER}${normal}...\t\t\t " diff --git a/files/etc/profile.d/bash_completion.sh b/files/etc/profile.d/bash_completion.sh index 70ca041..aed9e98 100644 --- a/files/etc/profile.d/bash_completion.sh +++ b/files/etc/profile.d/bash_completion.sh @@ -1,6 +1,7 @@ # shellcheck shell=sh disable=SC1091,SC2039,SC2166 # Check for interactive bash and that we haven't already been sourced. if [ "x${BASH_VERSION-}" != x -a "x${PS1-}" != x -a "x${BASH_COMPLETION_VERSINFO-}" = x ]; then + # Check for recent enough version of bash. if [ "${BASH_VERSINFO[0]}" -gt 4 ] || [ "${BASH_VERSINFO[0]}" -eq 4 -a "${BASH_VERSINFO[1]}" -ge 2 ]; then @@ -14,5 +15,16 @@ if [ "x${BASH_VERSION-}" != x -a "x${PS1-}" != x -a "x${BASH_COMPLETION_VERSINFO # Source completion code. . /usr/local/share/bash-completion/bash_completion fi + if ! test -L /home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew; then + /home/linuxbrew/.linuxbrew/bin/brew completions link + fi + if test -d /home/linuxbrew/.linuxbrew/etc/bash_completion.d; then + for rc in /home/linuxbrew/.linuxbrew/etc/bash_completion.d/*; do + if test -r "$rc"; then + . "$rc" + fi + done + unset rc + fi fi fi