V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 39s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 39s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -53,9 +53,9 @@ generate_sources() {
|
||||
var_hostsecure="${apt_sec,,}"
|
||||
|
||||
ary_components=(main)
|
||||
[[ "${apt_contrib,,}" == true ]] && ary_components+=(contrib)
|
||||
[[ "${apt_non_free,,}" == true ]] && ary_components+=(non-free)
|
||||
[[ "${apt_non_free_firmware,,}" == true ]] && ary_components+=(non-free-firmware)
|
||||
[[ "${apt_contrib,,}" == "true" ]] && ary_components+=(contrib)
|
||||
[[ "${apt_non_free,,}" == "true" ]] && ary_components+=(non-free)
|
||||
[[ "${apt_non_free_firmware,,}" == "true" ]] && ary_components+=(non-free-firmware)
|
||||
|
||||
if [[ "${apt_mirror_protocol,,}" == "https" ]]; then
|
||||
var_url="https://${var_hostname}${var_dir}"
|
||||
@@ -82,11 +82,11 @@ generate_sources() {
|
||||
#------------------------------------------------------------------------------------------------------------------------------#
|
||||
deb ${var_url} ${var_codename} ${ary_components[*]}
|
||||
EOF
|
||||
do_log "info" "true" "${TARGET}/etc/apt/sources.list entry generated: 'deb ${var_url} ${var_codename} ${ary_components[*]}'."
|
||||
do_log "info" "file_only" "${TARGET}/etc/apt/sources.list entry generated: 'deb ${var_url} ${var_codename} ${ary_components[*]}'."
|
||||
|
||||
if [[ "${var_deb_src}" == "true" ]]; then
|
||||
echo "deb-src ${var_url} ${var_codename} ${ary_components[*]}" >> "${TARGET}/etc/apt/sources.list"
|
||||
do_log "info" "true" "${TARGET}/etc/apt/sources.list entry generated: 'deb-src ${var_url} ${var_codename} ${ary_components[*]}'."
|
||||
do_log "info" "file_only" "${TARGET}/etc/apt/sources.list entry generated: 'deb-src ${var_url} ${var_codename} ${ary_components[*]}'."
|
||||
fi
|
||||
|
||||
### Security Repository
|
||||
@@ -95,10 +95,10 @@ EOF
|
||||
|
||||
deb ${var_surl} ${var_codename}-security ${ary_components[*]}
|
||||
EOF
|
||||
do_log "info" "true" "${TARGET}/etc/apt/sources.list entry generated: 'deb ${var_surl} ${var_codename}-security ${ary_components[*]}'."
|
||||
do_log "info" "file_only" "${TARGET}/etc/apt/sources.list entry generated: 'deb ${var_surl} ${var_codename}-security ${ary_components[*]}'."
|
||||
if [[ "${var_deb_src}" == "true" ]]; then
|
||||
echo "deb-src ${var_surl} ${var_codename}-security ${ary_components[*]}" >> "${TARGET}/etc/apt/sources.list"
|
||||
do_log "info" "true" "${TARGET}/etc/apt/sources.list entry generated: 'deb-src ${var_surl} ${var_codename}-security ${ary_components[*]}'."
|
||||
do_log "info" "file_only" "${TARGET}/etc/apt/sources.list entry generated: 'deb-src ${var_surl} ${var_codename}-security ${ary_components[*]}'."
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -108,10 +108,10 @@ EOF
|
||||
|
||||
deb ${var_url} ${var_codename}-updates ${ary_components[*]}
|
||||
EOF
|
||||
do_log "info" "true" "${TARGET}/etc/apt/sources.list entry generated: 'deb ${var_url} ${var_codename}-updates ${ary_components[*]}'."
|
||||
do_log "info" "file_only" "${TARGET}/etc/apt/sources.list entry generated: 'deb ${var_url} ${var_codename}-updates ${ary_components[*]}'."
|
||||
if [[ "${var_deb_src}" == "true" ]]; then
|
||||
echo "deb-src ${var_url} ${var_codename}-updates ${ary_components[*]}" >> "${TARGET}/etc/apt/sources.list"
|
||||
do_log "info" "true" "${TARGET}/etc/apt/sources.list entry generated: 'deb-src ${var_url} ${var_codename}-updates ${ary_components[*]}'."
|
||||
do_log "info" "file_only" "${TARGET}/etc/apt/sources.list entry generated: 'deb-src ${var_url} ${var_codename}-updates ${ary_components[*]}'."
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -121,10 +121,10 @@ EOF
|
||||
|
||||
deb ${var_url} ${var_codename}-backports ${ary_components[*]}
|
||||
EOF
|
||||
do_log "info" "true" "${TARGET}/etc/apt/sources.list entry generated: 'deb ${var_url} ${var_codename}-backports ${ary_components[*]}'."
|
||||
do_log "info" "file_only" "${TARGET}/etc/apt/sources.list entry generated: 'deb ${var_url} ${var_codename}-backports ${ary_components[*]}'."
|
||||
if [[ "${var_deb_src,,}" == "true" ]]; then
|
||||
echo "deb-src ${var_url} ${var_codename}-backports ${ary_components[*]}" >> "${TARGET}/etc/apt/sources.list"
|
||||
do_log "info" "true" "${TARGET}/etc/apt/sources.list entry generated: 'deb-src ${var_url} ${var_codename}-backports ${ary_components[*]}'."
|
||||
do_log "info" "file_only" "${TARGET}/etc/apt/sources.list entry generated: 'deb-src ${var_url} ${var_codename}-backports ${ary_components[*]}'."
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -142,7 +142,7 @@ EOF
|
||||
if [[ "${apt_updates_policy,,}" == "unattended" ]]; then
|
||||
|
||||
do_in_target "${TARGET}" apt-get install -y unattended-upgrades
|
||||
do_log "info" "true" "The update policy was set at installation time to '${apt_updates_policy}'."
|
||||
do_log "info" "file_only" "The update policy was set at installation time to '${apt_updates_policy}'."
|
||||
|
||||
elif [[ "${apt_updates_policy,,}" == "security" ]]; then
|
||||
|
||||
@@ -150,15 +150,15 @@ EOF
|
||||
|
||||
# shellcheck disable=SC2016
|
||||
sed -i 's/^[[:space:]]*"origin=Debian,codename=\${distro_codename},label=Debian";/\/\/ &/' "${TARGET}/etc/apt/apt.conf.d/50unattended-upgrades"
|
||||
do_log "info" "true" "The update policy was set at installation time to '${apt_updates_policy}'."
|
||||
do_log "info" "file_only" "The update policy was set at installation time to '${apt_updates_policy}'."
|
||||
|
||||
elif [[ "${apt_updates_policy,,}" == "none" ]]; then
|
||||
|
||||
do_log "info" "true" "The update policy was set at installation time to: '${apt_updates_policy}'."
|
||||
do_log "info" "file_only" "The update policy was set at installation time to: '${apt_updates_policy}'."
|
||||
|
||||
else
|
||||
|
||||
do_log "warning" "true" "Update policy '${apt_updates_policy}': is not supported. Using 'none' as default."
|
||||
do_log "warning" "file_only" "Update policy '${apt_updates_policy}': is not supported. Using 'none' as default."
|
||||
|
||||
fi
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user