]> ###2026.01.04 - Update to v2.21.4 ###2024.06.12 - Update to v2.18.1 ###2023.12.10 - Blacklist all cdc modules to ensure driver is correctly working with Unraid 6.12.5+ ###2023.12.04 - Blacklist cdc_ncm Kernel module to ensure driver is correctly working with Unraid 6.12.5+ ###2023.07.14 - Update support URL ###2023.07.12 - Bugfix for error message in terminal if package download failed ###2023.07.08a - Force update from the Plugin-Update-Helper ###2023.07.08 - Add Plugin-Update-Helper ###2023.07.01 - Initial release **RTL8152 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 r8152 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; exit 1 fi echo echo "-------------------Sucessfully downloaded RTL8152 package-------------------" else echo echo "-----------------------Can't download RTL8152 package-----------------------" rm -rf &plugin; &emhttp; 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 RTL8152 package!-------------------------" echo "--------This could take some time, please don't close this window!----------" download else echo echo "-----------------------RTL8152 package found locally------------------------" fi } # Define Variables KERNEL_V="$(uname -r)" PACKAGE="r8152" 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 cdc modules are already blacklisted, blacklist them if not if [ ! -d /boot/config/modprobe.d ]; then mkdir -p /boot/config/modprobe.d fi if [ ! "$(grep "blacklist" /boot/config/modprobe.d/cdc_ether.conf 2>/dev/null)" ]; then echo "blacklist cdc_ether" >> /boot/config/modprobe.d/cdc_ether.conf fi if [ ! "$(grep "blacklist" /boot/config/modprobe.d/cdc_mbim.conf 2>/dev/null)" ]; then echo "blacklist cdc_mbim" >> /boot/config/modprobe.d/cdc_mbim.conf fi if [ ! "$(grep "blacklist" /boot/config/modprobe.d/cdc_ncm.conf 2>/dev/null)" ]; then echo "blacklist cdc_ncm" >> /boot/config/modprobe.d/cdc_ncm.conf fi if [ ! "$(grep "blacklist" /boot/config/modprobe.d/r8153_ecm.conf 2>/dev/null)" ]; then echo "blacklist r8153_ecm" >> /boot/config/modprobe.d/r8153_ecm.conf fi # Check if RTL8152 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 if [[ $(modinfo r8152 | grep -w "version:" | cut -d 'v' -f3) == 2* ]]; then echo echo "-----------Nothing to do, OOT RTL8152 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 RTL8152---" echo "--------------------------" if [ "$(grep -v "blacklist" /boot/config/modprobe.d/cdc_ether.conf 2>/dev/null)" ]; then sed -i '/blacklist cdc_ether/d' /boot/config/modprobe.d/cdc_ether.conf 2>/dev/null else rm -f /boot/config/modprobe.d/cdc_ether.conf 2>/dev/null fi if [ "$(grep -v "blacklist" /boot/config/modprobe.d/cdc_mbim.conf 2>/dev/null)" ]; then sed -i '/blacklist cdc_mbim/d' /boot/config/modprobe.d/cdc_mbim.conf 2>/dev/null else rm -f /boot/config/modprobe.d/cdc_mbim.conf 2>/dev/null fi if [ "$(grep -v "blacklist" /boot/config/modprobe.d/cdc_ncm.conf 2>/dev/null)" ]; then sed -i '/blacklist cdc_ncm/d' /boot/config/modprobe.d/cdc_ncm.conf 2>/dev/null else rm -f /boot/config/modprobe.d/cdc_ncm.conf 2>/dev/null fi if [ "$(grep -v "blacklist" /boot/config/modprobe.d/r8153_ecm.conf 2>/dev/null)" ]; then sed -i '/blacklist r8153_ecm/d' /boot/config/modprobe.d/r8153_ecm.conf 2>/dev/null else rm -f /boot/config/modprobe.d/r8153_ecm.conf 2>/dev/null fi rm -rf &emhttp; rm -rf &plugin; echo echo "-----------------------------------------------------" echo "---RTL8152 uninstalled, please reboot your server!---" echo "-----------------------------------------------------" echo