From d49e73d0c614507c3d931822a20e25611b82fc1c Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@debian.org>
Date: Sat, 14 Apr 2018 14:08:07 +0100
Subject: 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.

Bug-Debian: http://bugs.debian.org/392222
Forwarded: not-needed
Last-Update: 2010-03-29

Patch-Name: config-opts-fallback.patch
---
 src/startup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/startup.c b/src/startup.c
index ac0ba54..291198f 100644
--- 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;
 }
 
