summaryrefslogtreecommitdiff
path: root/net/vpnc/patches/patch-aa
blob: fb194330c092069125dbc7bc4be8bfd86a9540b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
$NetBSD: patch-aa,v 1.8 2011/04/14 21:27:39 hans Exp $

--- config.c.orig	2007-09-10 22:39:48.000000000 +0200
+++ config.c	2008-05-28 16:32:56.000000000 +0100
@@ -267,12 +267,12 @@ static const char *config_def_app_versio
 
 static const char *config_def_script(void)
 {
-	return "/etc/vpnc/vpnc-script";
+	return "@PKG_SYSCONFDIR@/vpnc/vpnc-script";
 }
 
 static const char *config_def_pid_file(void)
 {
-	return "/var/run/vpnc/pid";
+	return "@VARBASE@/run/vpnc/pid";
 }
 
 static const char *config_def_vendor(void)
@@ -186,6 +186,16 @@ static const char *config_def_vendor(voi
 	return "cisco";
 }
 
+static const char *config_def_networks_list(void)
+{
+	return "";
+}
+
+static const char *config_def_dns_update(void)
+{
+	return "Yes";
+}
+
 static const char *config_def_target_network(void)
 {
 	return "0.0.0.0/0.0.0.0";
@@ -448,6 +458,21 @@ static const struct config_names_s {
 		"Target network in dotted decimal or CIDR notation\n",
 		config_def_target_network
 	}, {
+		CONFIG_DNS_UPDATE, 1, 1,
+		"--dns-update",
+		"DNSUpdate",
+		"",
+		"DEPRECATED extension from Debian",
+		config_def_dns_update
+	}, {
+		CONFIG_TARGET_NETWORKS, 1, 1,
+		"--target-networks",
+		"Target Networks",
+		NULL,
+		"DEPRECATED extension from Debian",
+		config_def_networks_list
+	}, {
+
 		0, 0, 0, NULL, NULL, NULL, NULL, NULL
 	}
 };
@@ -538,7 +538,7 @@ static char *get_config_filename(const c
 {
 	char *realname;
 	
-	asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
+	asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "@PKG_SYSCONFDIR@/vpnc/", name, add_dot_conf ? ".conf" : "");
 	return realname;
 }
 
@@ -757,8 +757,8 @@ void do_config(int argc, char **argv)
 	}
 	
 	if (!got_conffile) {
-		read_config_file("/etc/vpnc/default.conf", config, 1);
-		read_config_file("/etc/vpnc.conf", config, 1);
+		read_config_file("@PKG_SYSCONFDIR@/vpnc/default.conf", config, 1);
+		read_config_file("@PKG_SYSCONFDIR@/vpnc.conf", config, 1);
 	}
 	
 	if (!print_config) {