-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathstart_chroot_script
38 lines (32 loc) · 984 Bytes
/
start_chroot_script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
#
# Copyright 2021 by Stephan Wendel aka KwadFan
# <me@stephanwe.de>
# This file may distributed under GPLv3
########
## Source error handling, leave this in place
set -xe
# Source CustomPIOS common.sh
source /common.sh
install_cleanup_trap
### noninteractive Check
if [ -z "${DEBIAN_FRONTEND}" ]; then
export DEBIAN_FRONTEND=noninteractive
fi
## Force Update
apt-get update --allow-releaseinfo-change
### Pre Update Section
if [ "${PKGUPGRADE_DISTUPGRADE}" = "y" ]; then
echo_green "Performing 'apt-get ${PKGUPGRADE_DISTUPGRADE_METHOD}' ... "
apt-get ${PKGUPGRADE_DISTUPGRADE_METHOD} -y
else
echo_green "Skipping Dist Upgrade ['apt-get ${PKGUPGRADE_DISTUPGRADE_METHOD}']."
fi
### Pre Installer Section
# Make sure Cache is fresh
apt_update_skip
if [ "${PKGUPGRADE_USE_PREINSTALLER}" = "y" ]; then
apt-get install --yes --no-install-recommends "${PKGUPGRADE_PRE_INSTALL_PKGS}"
else
echo_red "PreInstall Mechanism not configured. [SKIPPED]"
fi