File: config-opts-fallback.patch

package info (click to toggle)
pcmciautils 018-8
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 448 kB
  • ctags: 1,014
  • sloc: ansic: 3,901; makefile: 230; lex: 222; sh: 169; yacc: 105
file content (23 lines) | stat: -rw-r--r-- 689 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Configuration file fallback
 Fall back to /usr/lib/pcmciautils/config.opts if /etc/pcmcia/config.opts
 doesn't exist.
 .
 This is Debian-specific, to deal with migration from the old pcmcia-cs
 package.
Author: Colin Watson <cjwatson@debian.org>
Bug-Debian: http://bugs.debian.org/392222
Forwarded: not-needed
Last-Update: 2010-03-29

--- a/src/startup.c
+++ b/src/startup.c
@@ -186,7 +186,8 @@ static void load_config(void)
 		syslog(LOG_ERR, "chdir to %s failed: %m", configpath);
 		exit(EXIT_FAILURE);
 	}
-	parse_configfile("config.opts");
+	if (parse_configfile("config.opts") == -1)
+                parse_configfile("/usr/lib/pcmciautils/config.opts");
 	return;
 }