From a123d4266935ff9d75a8e32dd29ee965e9eb4d50 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Sun, 29 Jun 2025 15:07:57 +0800 Subject: debian-dev: refactor all. --- store/debian-dev/setup/for-container.bash | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 store/debian-dev/setup/for-container.bash (limited to 'store/debian-dev/setup/for-container.bash') diff --git a/store/debian-dev/setup/for-container.bash b/store/debian-dev/setup/for-container.bash new file mode 100755 index 0000000..0aa47b0 --- /dev/null +++ b/store/debian-dev/setup/for-container.bash @@ -0,0 +1,14 @@ +#! /usr/bin/env bash + +set -e -o pipefail + +echo "set up locale" +localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 + +echo "set up sudo" +sed -i.bak 's|%sudo[[:space:]]\+ALL=(ALL:ALL)[[:space:]]\+ALL|%sudo ALL=(ALL:ALL) NOPASSWD: ALL|' /etc/sudoers + +if ! id "username" &>/dev/null; then + echo "create user $CRUPEST_DEBIAN_DEV_USER" + useradd -m -G sudo -s /usr/bin/bash "$CRUPEST_DEBIAN_DEV_USER" +fi -- cgit v1.2.3