Skip to content

Commit 5adb510

Browse files
committed
Use Bash shell by default
1 parent 97a28ee commit 5adb510

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ubuntu:22.04
22

3-
ARG VERSION=0.2.0
3+
ARG VERSION=0.3.0
44
ARG BUILDTOOLS_VERSION=4.0.26
55
ARG BUILDTOOLS_SHA256=6938ec21608f6152632093f078a8d30eb2a7c9efa686e373f907a1b907e7be47
66

@@ -80,6 +80,9 @@ RUN apt-get update && \
8080
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
8181
locale-gen && \
8282
\
83+
echo 'dash dash/sh boolean false' | debconf-set-selections && \
84+
dpkg-reconfigure dash && \
85+
\
8386
useradd -m -s /bin/bash yoctouser && \
8487
usermod -aG sudo yoctouser && \
8588
\

bin/entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ user_gid="${CUSTOM_GID:-1000}"
99
unset CUSTOM_UID
1010
unset CUSTOM_GID
1111

12-
if [ "$user_uid" != $(id -u "$user") ] || [ "$user_gid" != $(id -g "$user") ]; then
12+
if [ "$user_uid" != "$(id -u "$user")" ] || [ "$user_gid" != "$(id -g "$user")" ]; then
1313
groupmod --gid "$user_gid" "$user"
1414
usermod --uid "$user_uid" --gid "$user_gid" "$user"
15-
chown "$user_uid":"$user_gid" /home/"$user/.bashrc"
16-
chown "$user_uid":"$user_gid" /home/"$user/.sudo_as_admin_successful"
15+
chown "$user_uid":"$user_gid" "/home/$user/.bashrc"
16+
chown "$user_uid":"$user_gid" "/home/$user/.sudo_as_admin_successful"
1717
fi
1818

1919
exec gosu "$user" "$@"

bin/install-yocto-buildtools.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ trap 'rm -rf -- "$tmp_dir"' EXIT INT TERM
1515
cd "$tmp_dir"
1616

1717
echo "Downloading Yocto Buildtools for release ${RELEASE}..."
18-
1918
buildtools_installer="x86_64-buildtools-extended-nativesdk-standalone-${RELEASE}.sh"
2019
wget --quiet "https://downloads.yoctoproject.org/releases/yocto/yocto-${RELEASE}/buildtools/${buildtools_installer}"
2120

22-
echo "${SHA256SUM} ${buildtools_installer}" > checksum.sha256sum
23-
2421
echo "Verifying checksum..."
22+
echo "${SHA256SUM} ${buildtools_installer}" > checksum.sha256sum
2523
sha256sum --check checksum.sha256sum
2624

2725
echo "Installing Yocto Buildtools..."

0 commit comments

Comments
 (0)