Skip to content

Commit

Permalink
v6.23
Browse files Browse the repository at this point in the history
+ DietPi-Pre-patches | Remove the "critical" wording as most patches are not too critical but just need to be applied before APT or new DietPi code can be loaded without errors. So this became a regular method to apply patches in a reasonable order.
  • Loading branch information
MichaIng authored Apr 22, 2019
1 parent d299e3d commit ac9b160
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dietpi/pre-patch_file
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#////////////////////////////////////
#
# Info:
# - Online pre-patching for client system for changes made to update system and critical bug fixes
# - Patches changes made to update system, critical bug fixes and changes that need to be applied before APT and patch_file to run without error
# - Runs from dietpi-update as very first update step
# - In case of failure, returns related pre-patch ID as exit code
# - NB: Keep this script as simple as possible, do not load/call dietpi-globals, to allow fixing most kinds of DietPi code issues!
# - NB: Keep this script as simple as possible, do not load/call dietpi-globals, to allow adjusting/fixing most kinds of DietPi code first!
#
# Usage:
# - ./pre-patch_file $G_DIETPI_VERSION_SUB
Expand All @@ -22,7 +22,7 @@

echo -e '\n \e[38;5;154mDietPi-Pre-patch\e[0m
\e[90m─────────────────────────────────────────────────────
Mode: \e[0mApplying critical pre-patches\n'
Mode: \e[0mApplying pre-patches\n'

# Grab input, being failsafe when applying to $G_DIETPI_VERSION_SUB
if [[ $1 =~ ^-?[0-9]+$ ]]; then
Expand Down Expand Up @@ -53,7 +53,7 @@
fi
#-------------------------------------------------------------------------------
# Pre-patch 2: https://github.com/MichaIng/DietPi/pull/2490
if (( $G_DIETPI_VERSION_SUB < 21 )) && [[ -f /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf ]] &&
if (( $G_DIETPI_VERSION_SUB < 21 )) && [[ -f '/etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf' ]] &&
grep -qi 'buster' /etc/os-release; then

echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 2 | Patching /etc/mysql/mariadb.conf.d/99-dietpi-4byte.cnf for MariaDB v10.3/Buster support'
Expand All @@ -76,7 +76,7 @@
# Pre-patch 5: Add new G_CHECK_URL dietpi.txt settings
if (( $G_DIETPI_VERSION_SUB < 23 )); then

if [[ -f /etc/apt/preferences.d/dietpi-wireguard ]]; then
if [[ -f '/etc/apt/preferences.d/dietpi-wireguard' ]]; then

echo -e '\e[90m[\e[0m INFO \e[90m]\e[0m Pre-patch 4 | Hardening Debian Sid repo usage to prevent accidental distro upgrades but allow auto-upgrades for WireGuard packages'
echo -e 'Package: *\nPin: release n=sid\nPin-Priority: -1\n
Expand All @@ -90,7 +90,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=sid\nPin-Prior
fi
#-------------------------------------------------------------------------------
# Finished
echo -e '\e[90m[\e[0m \e[32mOK\e[0m \e[90m]\e[0m Successfully applied critical pre-patches\n'
echo -e '\e[90m[\e[0m \e[32mOK\e[0m \e[90m]\e[0m Successfully applied pre-patches\n'
break
#-------------------------------------------------------------------------------

Expand Down

0 comments on commit ac9b160

Please sign in to comment.