#! /bin/sh /usr/share/dpatch/dpatch-run # --- T2-COPYRIGHT-BEGIN --- # t2/package/*/arcload/hotfix-15_config_in_etc.patch # Copyright (C) 2020 - 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- ## 15_config_in_etc.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Look for arc.cf in /etc, fallback to / otherwise to maintain ## DP: compatibility with upstream. @DPATCH@ diff -urNad arcload-0.5~/loader/config.c arcload-0.5/loader/config.c --- arcload-0.5~/loader/config.c 2007-11-25 19:01:37.000000000 +0000 +++ arcload-0.5/loader/config.c 2007-11-25 19:07:10.000000000 +0000 @@ -15,7 +15,8 @@ #define READBLOCK 256 #define STRING_LEN 1024 -#define CONFIG_FILE "/arc.cf" +#define CONFIG_FILE "/arc.cf" +#define ALT_CONFIG_FILE "/boot/arc.cf" #define DEFAULT_KERNEL "/vmlinux" #define T_NONE 0 @@ -369,10 +370,16 @@ strcat(str, CONFIG_FILE); if(bopen(&file, str)) { printf("Opening %s failed - using default configuration.\n\r", str); - strcpy(image, system); - strcat(image, DEFAULT_KERNEL); - return; + strcpy(str, system); + strcat(str, ALT_CONFIG_FILE); + + if (bopen(&file, str)) { + printf("Opening %s failed - using default configuration.\n\r", str); + strcpy(image, system); + strcat(image, DEFAULT_KERNEL); + return; + } } if(!*label)