Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit a37d74b

Browse files
authored
* backport: devcontainers/features#96 ref: devcontainers/features#94 * Update sshd-debian.sh * Update sshd-debian.sh
1 parent 51cfb7f commit a37d74b

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

script-library/sshd-debian.sh

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,10 @@ elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
4141
USERNAME=root
4242
fi
4343

44-
# Function to run apt-get if needed
45-
apt_get_update_if_needed()
46-
{
47-
if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then
48-
echo "Running apt-get update..."
49-
apt-get update
50-
else
51-
echo "Skipping apt-get update."
52-
fi
53-
}
54-
5544
# Checks if packages are installed and installs them if not
5645
check_packages() {
5746
if ! dpkg -s "$@" > /dev/null 2>&1; then
58-
apt_get_update_if_needed
47+
apt-get update -y
5948
apt-get -y install --no-install-recommends "$@"
6049
fi
6150
}

0 commit comments

Comments
 (0)