Fix the dotnet auto-update issue (#248)
This commit is contained in:
parent
1e4d844f69
commit
124c6be56e
@ -85,8 +85,6 @@ elif [ "$UPDATE" = "true" ] && [ "$PRODUCT_INSTALLED" = "true" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
hold_package_version dotnet-host opensearch redis-server rabbitmq-server opensearch-dashboards fluent-bit
|
||||
|
||||
if [ "$MAKESWAP" == "true" ]; then
|
||||
make_swap
|
||||
fi
|
||||
|
@ -48,10 +48,12 @@ NODE_VERSION="18"
|
||||
curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -
|
||||
|
||||
#add dotnet repo
|
||||
if [[ "$DISTRIB_CODENAME" != noble ]]; then
|
||||
if [ "$DIST" = "debian" ] || [ "$DISTRIB_CODENAME" = "focal" ]; then
|
||||
curl https://packages.microsoft.com/config/$DIST/$REV/packages-microsoft-prod.deb -O
|
||||
echo -e "Package: *\nPin: origin \"packages.microsoft.com\"\nPin-Priority: 1002" | tee /etc/apt/preferences.d/99microsoft-prod.pref
|
||||
dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb
|
||||
elif dpkg -l | grep -q packages-microsoft-prod; then
|
||||
apt-get purge -y packages-microsoft-prod
|
||||
fi
|
||||
|
||||
MYSQL_REPO_VERSION="$(curl https://repo.mysql.com | grep -oP 'mysql-apt-config_\K.*' | grep -o '^[^_]*' | sort --version-sort --field-separator=. | tail -n1)"
|
||||
@ -142,3 +144,5 @@ if which apparmor_parser && [ ! -f /etc/apparmor.d/disable/usr.sbin.mysqld ] &&
|
||||
ln -sf /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/;
|
||||
apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld;
|
||||
fi
|
||||
|
||||
hold_package_version "dotnet-*" "aspnetcore-*" opensearch redis-server rabbitmq-server opensearch-dashboards fluent-bit
|
||||
|
@ -28,8 +28,7 @@ command_exists () {
|
||||
hold_package_version() {
|
||||
for package in "$@"; do
|
||||
if command -v apt-mark >/dev/null 2>&1 &&
|
||||
dpkg -s "$package" >/dev/null 2>&1 &&
|
||||
! apt-mark showhold | grep -q "$package" >/dev/null 2>&1
|
||||
dpkg-query -l "$package" >/dev/null 2>&1
|
||||
then
|
||||
apt-mark hold "$package"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user