Skip to content

Commit

Permalink
check for new version in update script (#2056)
Browse files Browse the repository at this point in the history
  • Loading branch information
enoch85 authored Jul 23, 2021
1 parent 629e887 commit 2232d6b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
24 changes: 13 additions & 11 deletions network/asusnuc/pn51.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ RVERSION="9.005.06"
# Make sure the installation directory exist
mkdir -p "$INSTALLDIR"

# Check for new version based on current version
# Since this runs in the update script, it's needs to be done before anything else is touched
print_text_in_color "$ICyan" "Checking for newer version of firmware..."
if ! curl -k -s https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software | grep "$RVERSION" >/dev/null
then
msg_box "It seems like there's a newer version of the Realtek Driver for the LAN network card.
Please report this to $ISSUES including this link:
https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
Thanks!"
fi

# Download the driver before it's removed (no internet when it's removed)
if [ ! -f "$INSTALLDIR"/r8125-"$RVERSION".tar.bz2 ]
then
Expand Down Expand Up @@ -155,14 +168,3 @@ fi
# Apply config
netplan apply
dhclient

# Check for new version based on current version (needs to happen after the new one is installed)
print_text_in_color "$ICyan" "Checking for newer version of firmware..."
if ! curl -k -s https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software | grep "$RVERSION" >/dev/null
then
msg_box "It seems like there's a newer version of the Realtek Driver for the LAN network card.
Please report this to $ISSUES including this link: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
Thanks!"
fi
13 changes: 9 additions & 4 deletions nextcloud_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,16 @@ then
fi
fi

# Don't upgrade if PN51 as it might break Realtek kernels (2021-07-20)
# TODO, remove this when a stable fix is in place
if ! asuspn51
# Upgrade OS dependencies
export DEBIAN_FRONTEND=noninteractive ; apt-get dist-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"

# Fix Realtek on PN51
if asuspn51
then
export DEBIAN_FRONTEND=noninteractive ; apt-get dist-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
# Upgrade Realtek drivers
print_text_in_color "$ICyan" "Upgrading Realtek firmware..."
curl_to_dir https://github.com/raw/nextcloud/vm/master/network/asusnuc pn51.sh "$SCRIPTS"
bash "$SCRIPTS"/pn51.sh
fi

# Update Netdata
Expand Down

0 comments on commit 2232d6b

Please sign in to comment.