update
This commit is contained in:
@@ -26,7 +26,7 @@ echo "[INFO] Bootstrapping Debian $DEBIAN_RELEASE..."
|
|||||||
debootstrap \
|
debootstrap \
|
||||||
--variant=minbase \
|
--variant=minbase \
|
||||||
--components=main,contrib,non-free \
|
--components=main,contrib,non-free \
|
||||||
--include=ca-certificates,software-properties-common,bash,wget,curl,nano,python3,python3-cryptography,locales \
|
--include=ca-certificates,software-properties-common,bash,wget,curl,nano,python3,locales \
|
||||||
--arch=amd64 \
|
--arch=amd64 \
|
||||||
"$DEBIAN_RELEASE" "$ROOTFS_DIR" http://deb.debian.org/debian/
|
"$DEBIAN_RELEASE" "$ROOTFS_DIR" http://deb.debian.org/debian/
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
echo "[CHROOT] Updating apt and setting locale..."
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y locales
|
||||||
|
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
|
||||||
|
locale-gen
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
echo "[CHROOT] Installing python3-cryptography safely..."
|
||||||
|
apt-get install -y python3-cryptography
|
||||||
|
|
||||||
echo "[CHROOT] Configuring Debian system..."
|
echo "[CHROOT] Configuring Debian system..."
|
||||||
|
|
||||||
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/10-assume_yes
|
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/10-assume_yes
|
||||||
@@ -10,9 +24,10 @@ echo "[CHROOT] Removing unnecessary packages..."
|
|||||||
apt-get remove --purge --allow-remove-essential pinentry-curses whiptail kmod iptables iproute2 dmidecode || true
|
apt-get remove --purge --allow-remove-essential pinentry-curses whiptail kmod iptables iproute2 dmidecode || true
|
||||||
|
|
||||||
echo "[CHROOT] Cleaning up..."
|
echo "[CHROOT] Cleaning up..."
|
||||||
apt-get clean
|
dpkg --configure -a
|
||||||
apt-get install -f
|
apt-get install -f
|
||||||
find /var/lib/apt/lists/ -type f -delete
|
apt-get clean
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "[CHROOT] Done. Type 'exit' to return."
|
echo "[CHROOT] Done. Type 'exit' to return."
|
||||||
exit
|
exit
|
||||||
|
|||||||
Reference in New Issue
Block a user