V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 59s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 59s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -78,7 +78,7 @@ apt:
|
|||||||
# Basic settings
|
# Basic settings
|
||||||
################################################################################################################################
|
################################################################################################################################
|
||||||
architecture: "amd64" # MUST be one of "amd64" or "arm64".
|
architecture: "amd64" # MUST be one of "amd64" or "arm64".
|
||||||
chroot_debug: "true" # Enable debug mode in the chroot environment in case of errors.
|
chroot_debug: "false" # Enable debug mode in the chroot environment in case of errors.
|
||||||
debootstrap: # Provide a mirror for downloading the Debian packages for debootstrap.
|
debootstrap: # Provide a mirror for downloading the Debian packages for debootstrap.
|
||||||
# Specify the packages to be included in the debootstrapping process. Include a comma-separated
|
# Specify the packages to be included in the debootstrapping process. Include a comma-separated
|
||||||
# list of official Debian packages.
|
# list of official Debian packages.
|
||||||
@@ -543,13 +543,38 @@ software:
|
|||||||
##############################################################################################################################
|
##############################################################################################################################
|
||||||
### Installed by 4000_debootstrap.sh
|
### Installed by 4000_debootstrap.sh
|
||||||
##############################################################################################################################
|
##############################################################################################################################
|
||||||
|
# adduser
|
||||||
|
# apt
|
||||||
|
# apt-utils
|
||||||
|
# base-files
|
||||||
|
# base-passwd
|
||||||
# bash
|
# bash
|
||||||
|
# bsdutils
|
||||||
# busybox
|
# busybox
|
||||||
# ca-certificates
|
# ca-certificates
|
||||||
# coreutils
|
# coreutils
|
||||||
|
# cpio
|
||||||
|
# cron
|
||||||
|
# dash
|
||||||
|
# debconf
|
||||||
|
# debian-archive-keyring
|
||||||
|
# debianutils
|
||||||
|
# dhcpcd-base
|
||||||
|
# diffutils
|
||||||
# e2fsprogs
|
# e2fsprogs
|
||||||
|
# fdisk
|
||||||
|
# findutils
|
||||||
|
# grep
|
||||||
|
# gzip
|
||||||
|
# hostname
|
||||||
|
# ifupdown
|
||||||
|
# iproute2
|
||||||
|
# iputils-ping
|
||||||
# kmod
|
# kmod
|
||||||
|
# less
|
||||||
# locales
|
# locales
|
||||||
|
# login
|
||||||
|
# logrotate
|
||||||
# nano
|
# nano
|
||||||
# openssl
|
# openssl
|
||||||
# passwd
|
# passwd
|
||||||
@@ -579,22 +604,15 @@ software:
|
|||||||
# dmsetup
|
# dmsetup
|
||||||
# dosfstools
|
# dosfstools
|
||||||
# efibootmgr
|
# efibootmgr
|
||||||
# fdisk
|
|
||||||
# file
|
# file
|
||||||
# gawk
|
# gawk
|
||||||
# gdisk
|
# gdisk
|
||||||
# gnupg
|
# gnupg
|
||||||
# grep
|
|
||||||
# gzip
|
|
||||||
# haveged
|
# haveged
|
||||||
# initramfs-tools
|
# initramfs-tools
|
||||||
# iproute2
|
|
||||||
# iputils-ping
|
|
||||||
# jq
|
# jq
|
||||||
# kbd
|
# kbd
|
||||||
# keyutils
|
|
||||||
# libpam-pwquality
|
# libpam-pwquality
|
||||||
# logrotate
|
|
||||||
# lsb-release
|
# lsb-release
|
||||||
# parted
|
# parted
|
||||||
# pciutils
|
# pciutils
|
||||||
@@ -729,6 +747,7 @@ software:
|
|||||||
- figlet
|
- figlet
|
||||||
- htop
|
- htop
|
||||||
- keychain
|
- keychain
|
||||||
|
- keyutils
|
||||||
- python3
|
- python3
|
||||||
- virt-what
|
- virt-what
|
||||||
|
|
||||||
|
|||||||
@@ -36,65 +36,35 @@ installation_toolset() {
|
|||||||
[btrfs]="btrfs-progs"
|
[btrfs]="btrfs-progs"
|
||||||
[bunzip2]="bzip2"
|
[bunzip2]="bzip2"
|
||||||
[setupcon]="console-setup"
|
[setupcon]="console-setup"
|
||||||
[base64]="coreutils"
|
|
||||||
[cat]="coreutils"
|
|
||||||
[chmod]="coreutils"
|
|
||||||
[chown]="coreutils"
|
|
||||||
[cp]="coreutils"
|
|
||||||
[echo]="coreutils"
|
|
||||||
[ln]="coreutils"
|
|
||||||
[mkdir]="coreutils"
|
|
||||||
[curl]="curl"
|
[curl]="curl"
|
||||||
[dirmngr]="dirmngr"
|
[dirmngr]="dirmngr"
|
||||||
[dmsetup]="dmsetup"
|
[dmsetup]="dmsetup"
|
||||||
[fsck.vfat]="dosfstools"
|
[fsck.vfat]="dosfstools"
|
||||||
[mkfs.vfat]="dosfstools"
|
[mkfs.vfat]="dosfstools"
|
||||||
[e2label]="e2fsprogs"
|
|
||||||
[tune2fs]="e2fsprogs"
|
|
||||||
[fsck]="e2fsprogs"
|
|
||||||
[efibootmgr]="efibootmgr"
|
[efibootmgr]="efibootmgr"
|
||||||
[fdisk]="fdisk"
|
|
||||||
[file]="file"
|
[file]="file"
|
||||||
[awk]="gawk"
|
[awk]="gawk"
|
||||||
[gdisk]="gdisk"
|
[gdisk]="gdisk"
|
||||||
[gnupg]="gnupg"
|
[gnupg]="gnupg"
|
||||||
[grep]="grep"
|
|
||||||
[gzip]="gzip"
|
|
||||||
[haveged]="haveged"
|
[haveged]="haveged"
|
||||||
[update-initramfs]="initramfs-tools"
|
[update-initramfs]="initramfs-tools"
|
||||||
[ip]="iproute2"
|
|
||||||
[ping]="iputils-ping"
|
|
||||||
[jq]="jq"
|
[jq]="jq"
|
||||||
[loadkeys]="kbd"
|
[loadkeys]="kbd"
|
||||||
[setfont]="kbd"
|
[setfont]="kbd"
|
||||||
[keyctl]="keyutils"
|
|
||||||
[modprobe]="kmod"
|
|
||||||
[libpam-pwquality]="libpam-pwquality"
|
[libpam-pwquality]="libpam-pwquality"
|
||||||
[logrotate]="logrotate"
|
|
||||||
[lsb_release]="lsb-release"
|
[lsb_release]="lsb-release"
|
||||||
[parted]="parted"
|
[parted]="parted"
|
||||||
[chpasswd]="passwd"
|
|
||||||
[chsh]="passwd"
|
|
||||||
[lspci]="pciutils"
|
[lspci]="pciutils"
|
||||||
[sysctl]="procps"
|
[sysctl]="procps"
|
||||||
[pwgen]="pwgen"
|
[pwgen]="pwgen"
|
||||||
[sed]="sed"
|
|
||||||
[sudo]="sudo"
|
[sudo]="sudo"
|
||||||
[tar]="tar"
|
|
||||||
[tree]="tree"
|
[tree]="tree"
|
||||||
[unzip]="unzip"
|
[unzip]="unzip"
|
||||||
[lsusb]="usbutils"
|
[lsusb]="usbutils"
|
||||||
[blkid]="util-linux"
|
|
||||||
[dmesg]="util-linux"
|
|
||||||
[lsblk]="util-linux"
|
|
||||||
[findmnt]="util-linux"
|
|
||||||
[mount]="util-linux"
|
|
||||||
[umount]="util-linux"
|
|
||||||
[xxd]="vim-common"
|
[xxd]="vim-common"
|
||||||
[wget]="wget"
|
[wget]="wget"
|
||||||
[whois]="whois"
|
[whois]="whois"
|
||||||
[zsh]="zsh"
|
[zsh]="zsh"
|
||||||
[zstd]="zstd"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
declare -a ary_missing_pkgs=() ary_unique_pkgs=()
|
declare -a ary_missing_pkgs=() ary_unique_pkgs=()
|
||||||
|
|||||||
@@ -15,9 +15,12 @@ guard_sourcing
|
|||||||
#######################################
|
#######################################
|
||||||
# Check for required deb packages to run the script.
|
# Check for required deb packages to run the script.
|
||||||
# Globals:
|
# Globals:
|
||||||
|
# DIR_LOG
|
||||||
# VAR_AUTO_INSTALL
|
# VAR_AUTO_INSTALL
|
||||||
# Arguments:
|
# Arguments:
|
||||||
# None
|
# None
|
||||||
|
# Returns:
|
||||||
|
# 0: on success
|
||||||
#######################################
|
#######################################
|
||||||
check_pkgs() {
|
check_pkgs() {
|
||||||
### Declare Arrays, HashMaps, and Variables.
|
### Declare Arrays, HashMaps, and Variables.
|
||||||
@@ -37,29 +40,22 @@ check_pkgs() {
|
|||||||
[file]="file"
|
[file]="file"
|
||||||
[awk]="gawk"
|
[awk]="gawk"
|
||||||
[gdisk]="gdisk"
|
[gdisk]="gdisk"
|
||||||
[grep]="grep"
|
|
||||||
[gzip]="gzip"
|
|
||||||
[ip]="iproute2"
|
|
||||||
[ping]="iputils-ping"
|
|
||||||
[jq]="jq"
|
[jq]="jq"
|
||||||
[lsb_release]="lsb-release"
|
[lsb_release]="lsb-release"
|
||||||
[parted]="parted"
|
[parted]="parted"
|
||||||
[chpasswd]="passwd"
|
|
||||||
[chsh]="passwd"
|
|
||||||
[pwgen]="pwgen"
|
[pwgen]="pwgen"
|
||||||
[sed]="sed"
|
[sed]="sed"
|
||||||
[tar]="tar"
|
[tar]="tar"
|
||||||
[tree]="tree"
|
[tree]="tree"
|
||||||
[unzip]="unzip"
|
[unzip]="unzip"
|
||||||
[blkid]="util-linux"
|
|
||||||
[wget]="wget"
|
[wget]="wget"
|
||||||
[whois]="whois"
|
[whois]="whois"
|
||||||
[zsh]="zsh"
|
|
||||||
[zstd]="zstd"
|
|
||||||
)
|
)
|
||||||
declare -a ary_missing_pkgs=() ary_unique_pkgs=()
|
declare -a ary_missing_pkgs=() ary_unique_pkgs=()
|
||||||
declare var_bin=""
|
declare var_bin=""
|
||||||
|
|
||||||
|
touch "${DIR_LOG}/0030_check_pkgs.log"
|
||||||
|
|
||||||
### Collecting missing binaries.
|
### Collecting missing binaries.
|
||||||
for var_bin in "${!hmp_tool_pkg[@]}"; do
|
for var_bin in "${!hmp_tool_pkg[@]}"; do
|
||||||
|
|
||||||
@@ -79,7 +75,8 @@ check_pkgs() {
|
|||||||
# shellcheck disable=SC2312
|
# shellcheck disable=SC2312
|
||||||
mapfile -t ary_unique_pkgs < <(printf '%s\n' "${ary_missing_pkgs[@]}" | sort -u)
|
mapfile -t ary_unique_pkgs < <(printf '%s\n' "${ary_missing_pkgs[@]}" | sort -u)
|
||||||
do_log "debug" "file_only" "0030() [ary_unique_pkgs]='${ary_unique_pkgs[*]}'."
|
do_log "debug" "file_only" "0030() [ary_unique_pkgs]='${ary_unique_pkgs[*]}'."
|
||||||
apt-get install -y --no-install-recommends --no-install-suggests "${ary_unique_pkgs[*]}" >| "${DIR_LOG}/0030_check_pkgs.log"
|
# shellcheck disable=SC2312
|
||||||
|
apt-get install -y --no-install-recommends --no-install-suggests "${ary_unique_pkgs[*]}" 2>&1 | tee -a "${DIR_LOG}/0030_check_pkgs.log"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -87,14 +84,17 @@ check_pkgs() {
|
|||||||
if grep -RqsE '^[[:space:]]*deb .*backports' /etc/apt/sources.list /etc/apt/sources.list.d; then
|
if grep -RqsE '^[[:space:]]*deb .*backports' /etc/apt/sources.list /etc/apt/sources.list.d; then
|
||||||
# shellcheck disable=SC2155
|
# shellcheck disable=SC2155
|
||||||
declare codename=$(lsb_release -sc)
|
declare codename=$(lsb_release -sc)
|
||||||
apt-get install -y -t "${codename}-backports" debootstrap >> "${DIR_LOG}/0030_check_pkgs.log"
|
# shellcheck disable=SC2312
|
||||||
|
apt-get install -y -t "${codename}-backports" debootstrap 2>&1 | tee -a "${DIR_LOG}/0030_check_pkgs.log"
|
||||||
else
|
else
|
||||||
apt-get install -y debootstrap >> "${DIR_LOG}/0030_check_pkgs.log"
|
# shellcheck disable=SC2312
|
||||||
|
apt-get install -y debootstrap 2>&1 | tee -a "${DIR_LOG}/0030_check_pkgs.log"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$(command -v dialog || true)" ]]; then
|
if [[ -z "$(command -v dialog || true)" ]]; then
|
||||||
if ! "${VAR_AUTO_INSTALL}"; then apt-get install -y --no-install-recommends dialog >> "${DIR_LOG}/0030_check_pkgs.log"; fi
|
# shellcheck disable=SC2312
|
||||||
|
if ! "${VAR_AUTO_INSTALL}"; then apt-get install -y --no-install-recommends dialog 2>&1 | tee -a "${DIR_LOG}/0030_check_pkgs.log"; fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
guard_dir && return 0
|
guard_dir && return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user