From 348ebc3bc228dd6b19c5b89f776777088cf763cb Mon Sep 17 00:00:00 2001 From: Christoph Hummer Date: Thu, 9 Nov 2023 11:06:05 +0100 Subject: [PATCH] Update rc.S.cont only execute rc.modules if unraidsafemode is not set --- etc/rc.d/rc.S.cont | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/etc/rc.d/rc.S.cont b/etc/rc.d/rc.S.cont index 46e3ddb9e..0ab421f14 100755 --- a/etc/rc.d/rc.S.cont +++ b/etc/rc.d/rc.S.cont @@ -15,10 +15,15 @@ # LimeTech - bind selected devices to vfio-pci /usr/local/sbin/vfio-pci 1>/var/log/vfio-pci 2>/var/log/vfio-pci-errors -# Run the kernel module script. This updates the module dependencies and -# also supports manually loading kernel modules through rc.modules.local. -if [[ -x /etc/rc.d/rc.modules ]]; then - /etc/rc.d/rc.modules +# If "unraidsafemode" indicated, skip installing driver packages +if [[ -f /boot/unraidsafemode ]] || grep -wq unraidsafemode /proc/cmdline; then + log "Unraid Safe Mode (unraidsafemode) has been set, skip driver installation" +else + # Run the kernel module script. This updates the module dependencies and + # also supports manually loading kernel modules through rc.modules.local. + if [[ -x /etc/rc.d/rc.modules ]]; then + /etc/rc.d/rc.modules + fi fi # Initialize udev to manage /dev entries and hotplugging.