1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 # --- T2-COPYRIGHT-NOTE-BEGIN ---
3 # This copyright note is auto-generated by scripts/Create-CopyPatch.
5 # T2 SDE: package/.../arcload/15_config_in_etc.patch
6 # Copyright (C) 2020 The T2 SDE Project
8 # More information can be found in the files COPYING and README.
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
16 # --- T2-COPYRIGHT-NOTE-END ---
18 ## 15_config_in_etc.dpatch by <jblache@debian.org>
20 ## All lines beginning with `## DP:' are a description of the patch.
21 ## DP: Look for arc.cf in /etc, fallback to / otherwise to maintain
22 ## DP: compatibility with upstream.
25 diff -urNad arcload-0.5~
/loader
/config.c arcload-0.5
/loader
/config.c
26 --- arcload-0.5~
/loader
/config.c
2007-11-25 19:01:37.000000000 +0000
27 +++ arcload-0.5
/loader
/config.c
2007-11-25 19:07:10.000000000 +0000
31 #define STRING_LEN 1024
32 -#define CONFIG_FILE "/arc.cf"
33 +#define CONFIG_FILE "/arc.cf"
34 +#define ALT_CONFIG_FILE "/boot/arc.cf"
35 #define DEFAULT_KERNEL "/vmlinux"
39 strcat
(str
, CONFIG_FILE
);
41 if(bopen
(&file, str
)) {
42 printf("Opening %s failed - using default configuration.\n\r", str
);
43 - strcpy
(image
, system
);
44 - strcat
(image
, DEFAULT_KERNEL
);
46 + strcpy
(str
, system
);
47 + strcat
(str
, ALT_CONFIG_FILE
);
49 + if (bopen
(&file, str
)) {
50 + printf("Opening %s failed - using default configuration.\n\r", str
);
51 + strcpy
(image
, system
);
52 + strcat
(image
, DEFAULT_KERNEL
);