summaryrefslogtreecommitdiff
path: root/net/upclient/patches/patch-aa
blob: f634e9ff15dc47998c0125b79eaac401415a49a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-aa,v 1.8 2003/07/02 18:22:42 jmmv Exp $

--- src/options.c.orig	2001-06-16 21:15:04.000000000 +0200
+++ src/options.c
@@ -294,13 +294,10 @@ int read_config(void) {
 
   /* Try to open config file in current directory */
   if(!(fp = fopen(CONFIGFILE, "r"))) {
-    /* Failed, now try to open config file in /etc */
-    if(!(fp = fopen("/etc/"CONFIGFILE, "r"))) {
-      /* Failed, now try to open config file in /usr/local/etc */
-      if(!(fp = fopen("/usr/local/etc/"CONFIGFILE, "r"))) {
-        printf("Error: couldn't open config file %s for reading in:\n- current directory\n- /etc\n- /usr/local/etc\n", CONFIGFILE);
-        exit(-1);
-      }
+    /* Failed, now try to open config file in PKG_SYSCONFDIR */
+    if(!(fp = fopen(PKG_SYSCONFDIR "/"CONFIGFILE, "r"))) {
+      printf("Error: couldn't open config file %s for reading in:\n- current directory\n- " PKG_SYSCONFDIR "\n", CONFIGFILE);
+      exit(-1);
     }
   }