From 33872603eae5c9093d0ad815221910bdc3dc894d Mon Sep 17 00:00:00 2001 From: ljm42 Date: Tue, 28 Jan 2025 13:19:47 -0700 Subject: [PATCH] feat: install priority plugins first --- etc/rc.d/rc.local | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/etc/rc.d/rc.local b/etc/rc.d/rc.local index 765ce31ce..50e51643a 100755 --- a/etc/rc.d/rc.local +++ b/etc/rc.d/rc.local @@ -163,11 +163,23 @@ else log "Installing /boot/extra packages" ( export -f log; find /boot/extra -maxdepth 1 -type f -exec sh -c 'upgradepkg --terse --install-new "$1" | log' -- "{}" \; ) fi - # Install plugins - log "Installing plugins" + PRIORITY_PLUGINS=("unraid.patch.plg" "dynamix.unraid.net.plg" "dynamix.unraid.net.staging.plg") + # Install priority plugins first + for PRIORITY_PLUGIN in "${PRIORITY_PLUGINS[@]}"; do + PRIORITY_PLUGIN_PATH="$CONFIG/plugins/$PRIORITY_PLUGIN" + if [[ -f "$PRIORITY_PLUGIN_PATH" ]]; then + /usr/local/sbin/plugin install "$PRIORITY_PLUGIN_PATH" | log + fi + done + # Install remaining plugins shopt -s nullglob for PLUGIN in $CONFIG/plugins/*.plg; do - /usr/local/sbin/plugin install $PLUGIN | log + PLUGIN_NAME=$(basename "$PLUGIN") + # Skip already installed priority plugins + if [[ " ${PRIORITY_PLUGINS[*]} " == *" $PLUGIN_NAME "* ]]; then + continue + fi + /usr/local/sbin/plugin install "$PLUGIN" | log done shopt -u nullglob fi