pkgsrc/net/vpnc/patches/patch-aa

78 lines
2 KiB
Text

$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) {