]> ###2026.01.04 - Bump version to v9.016.01 ###2024.04.04 - Bump version to v9.013.02 ###2024.01.03 - Bump version to v9.012.04 and disable noisy log info rss get rxnfc ###2023.11.15 - Bump version to v9.012.03 ###2023.07.14 - Update support URL ###2023.07.13 - Don't remove blacklist if r8168 plugin is installed ###2023.07.12 - Restart network if package download failed to get a valid IP address on boot with the in tree driver - Bugfix for error message in terminal if package download failed ###2023.07.09 - Remove blacklist from r8169 module and load module r8169 if download failed ###2023.07.08a - Force update from the Plugin-Update-Helper ###2023.07.08 - Add Plugin-Update-Helper ###2023.07.01 - Initial release **RTL8125 Drivers** This package contains the Realtek OOT Drivers and installs them, a reboot is required after installing the plugin (upgrading to a newer Unraid version maybe needs a second reboot too). Source: https://github.com/jinlife/unraid-r8125-r8152-driver download() { # Download r8125 package if wget -q -nc --show-progress --progress=bar:force:noscroll -O "&packages;/${KERNEL_V%%-*}/${LAT_PACKAGE}" "${DL_URL}/${LAT_PACKAGE}" 2>/dev/null ; then wget -q -nc --show-progress --progress=bar:force:noscroll -O "&packages;/${KERNEL_V%%-*}/${LAT_PACKAGE}.md5" "${DL_URL}/${LAT_PACKAGE}.md5" if [ "$(md5sum &packages;/${KERNEL_V%%-*}/${LAT_PACKAGE} | awk '{print $1}')" != "$(cat &packages;/${KERNEL_V%%-*}/${LAT_PACKAGE}.md5 | awk '{print $1}')" ]; then echo echo "---CHECKSUM ERROR!---" rm -rf &plugin; &emhttp; if [ ! -f /boot/config/plugins/unraid-r8168.plg ] && [ ! -f /boot/config/plugins/unraid-r8126.plg ]; then remove_blacklist_r8169 fi exit 1 fi echo echo "-------------------Sucessfully downloaded RTL8125 package-------------------" else echo echo "-----------------------Can't download RTL8125 package-----------------------" rm -rf &plugin; &emhttp; if [ ! -f /boot/config/plugins/unraid-r8168.plg ] && [ ! -f /boot/config/plugins/unraid-r8126.plg ]; then remove_blacklist_r8169 fi exit 1 fi } check() { if ! ls -1 &packages;/${KERNEL_V%%-*}/ | grep -q "${PACKAGE}" ; then LAT_PACKAGE="$(wget -qO- https://api.github.com/repos/jinlife/unraid-r8125-r8152-driver/releases/tags/${KERNEL_V} | jq -r '.assets[].name' | grep "${PACKAGE}" | grep -E -v '\.md5$' | sort -V | tail -1)" echo echo "-----------------------Downloading RTL8125 package!-------------------------" echo "--------This could take some time, please don't close this window!----------" download else echo echo "-----------------------RTL8125 package found locally------------------------" fi } remove_blacklist_r8169() { if [ "$(grep -v "blacklist" /boot/config/modprobe.d/r8169.conf 2>/dev/null)" ]; then sed -i '/blacklist r8169/d' /boot/config/modprobe.d/r8169.conf 2>/dev/null else rm -rf /boot/config/modprobe.d/r8169.conf 2>/dev/null fi /sbin/modprobe r8169 2>/dev/null /etc/rc.d/rc.inet1 restart 2>/dev/null } # Define Variables KERNEL_V="$(uname -r)" PACKAGE="r8125" DL_URL="https://github.com/jinlife/unraid-r8125-r8152-driver/releases/download/$KERNEL_V" if [ ! -d "&packages;/${KERNEL_V%%-*}" ]; then mkdir -p "&packages;/${KERNEL_V%%-*}" fi # Check for old packages rm -rf $(ls -d &packages;/* | grep -v "${KERNEL_V%%-*}") # Check if RTL8125 package is already downloaded and installed check if [ ! -f "&plugin;/&name;.png" ]; then wget -q -nc --show-progress --progress=bar:force:noscroll -O "&plugin;/&name;.png" "https://raw.githubusercontent.com/ich777/docker-templates/master/ich777/images/realtek.png" fi #Install icon if [ ! -f "&emhttp;/images/&name;.png" ]; then if [ ! -d "&emhttp;/images" ]; then mkdir -p &emhttp;/images fi cp &plugin;/&name;.png &emhttp;/images/ fi #Check if r8169 module is already blacklisted if [ ! "$(grep "blacklist" /boot/config/modprobe.d/r8169.conf 2>/dev/null)" ]; then if [ ! -d /boot/config/modprobe.d ]; then mkdir -p /boot/config/modprobe.d fi echo "----Blacklisting r8169 module to ensure module r8125 is working properly----" echo "blacklist r8169" >> /boot/config/modprobe.d/r8169.conf fi # Check if module is found, if not display message to reboot if modinfo r8125 2>/dev/null ; then echo echo "-----------Nothing to do, OOT RTL8125 package already installed-------------" echo else echo echo "-----------Please reboot your server to activate the OOT driver!------------" echo fi #Check if Plugin Update Helper is downloaded and up-to-date if [ ! -f &plugin;/plugin_update_helper ]; then wget -q -T 5 -O &plugin;/plugin_update_helper "https://raw.githubusercontent.com/ich777/unraid-plugin_update_helper/master/plugin_update_helper" else CUR_V="$(grep -E "Plugin-Update-Helper version:" &plugin;/plugin_update_helper | awk '{print $4}')" if [ ! -s /tmp/update-helper ]; then echo "$(wget -T5 -qO- https://raw.githubusercontent.com/ich777/unraid-plugin_update_helper/master/plugin_update_helper | grep -E "Plugin-Update-Helper version:" | awk '{print $4}')" > /tmp/update-helper AVAIL_V="$(cat /tmp/update-helper)" else AVAIL_V="$(cat /tmp/update-helper)" fi if [ ! -z "$AVAIL_V" ]; then COMPARE="$(sort -V <(echo -e "${AVAIL_V}\n$CUR_V") | tail -1)" if [ "$CUR_V" != "$COMPARE" ]; then wget -q -T 5 -O &plugin;/plugin_update_helper "https://raw.githubusercontent.com/ich777/unraid-plugin_update_helper/master/plugin_update_helper" fi fi fi #Check if Plugin Update Helper is installed and up to date if [ ! -f /usr/bin/plugin_update_helper ]; then cp &plugin;/plugin_update_helper /usr/bin/plugin_update_helper chmod +x /usr/bin/plugin_update_helper else PLUGIN_V="$(grep -E "Plugin-Update-Helper version:" &plugin;/plugin_update_helper | awk '{print $4}')" INST_V="$(grep -E "Plugin-Update-Helper version:" /usr/bin/plugin_update_helper | awk '{print $4}')" COMPARE="$(sort -V <(echo -e "${PLUGIN_V}\n$INST_V") | tail -1)" if [ "$INST_V" != "$COMPARE" ]; then kill $(ps aux | grep -E "inotifywait -q /boot/changes.txt -e move_self,delete_self" | grep -v "grep -E inotifywait" | awk '{print $2}') 2>/dev/null sleep 1 cp &plugin;/plugin_update_helper /usr/bin/plugin_update_helper chmod +x /usr/bin/plugin_update_helper fi fi #Start Plugin Update Helper if [ -z "$(ps aux | grep -E "inotifywait -q /boot/changes.txt -e move_self,delete_self" | grep -v "grep -E inotifywait" | awk '{print $2}')" ]; then echo "/usr/bin/plugin_update_helper" | at now -M > /dev/null 2>&1 fi echo "--------------------------" echo "---Uninstalling RTL8125---" echo "--------------------------" # Remove plugin related files if [ ! -f /boot/config/plugins/unraid-r8168.plg ] && [ ! -f /boot/config/plugins/unraid-r8126.plg ]; then if [ "$(grep -v "blacklist" /boot/config/modprobe.d/r8169.conf 2>/dev/null)" ]; then sed -i '/blacklist r8169/d' /boot/config/modprobe.d/r8169.conf 2>/dev/null else rm -rf /boot/config/modprobe.d/r8169.conf 2>/dev/null fi fi rm -rf &emhttp; rm -rf &plugin; echo echo "-----------------------------------------------------" echo "---RTL8125 uninstalled, please reboot your server!---" echo "-----------------------------------------------------" echo