net-tools: fix hardcoded paths
This commit is contained in:
parent
3085cc5f48
commit
81a248dd1e
21
packages/net-tools/arp.c.patch
Normal file
21
packages/net-tools/arp.c.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -uNr net-tools/arp.c net-tools.mod/arp.c
|
||||
--- net-tools/arp.c 2017-02-21 20:24:32.000000000 +0200
|
||||
+++ net-tools.mod/arp.c 2019-03-01 19:05:20.555355036 +0200
|
||||
@@ -644,7 +644,7 @@
|
||||
fprintf(stderr, _(" -i, --device specify network interface (e.g. eth0)\n"));
|
||||
fprintf(stderr, _(" -D, --use-device read <hwaddr> from given device\n"));
|
||||
fprintf(stderr, _(" -A, -p, --protocol specify protocol family\n"));
|
||||
- fprintf(stderr, _(" -f, --file read new entries from file or from /etc/ethers\n\n"));
|
||||
+ fprintf(stderr, _(" -f, --file read new entries from file or from $PREFIX/etc/ethers\n\n"));
|
||||
|
||||
fprintf(stderr, _(" <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"), DFLT_HW);
|
||||
fprintf(stderr, _(" List of possible hardware types (which support ARP):\n"));
|
||||
@@ -791,7 +791,7 @@
|
||||
break;
|
||||
|
||||
case 2: /* process an EtherFile */
|
||||
- what = arp_file(argv[optind] ? argv[optind] : "/etc/ethers");
|
||||
+ what = arp_file(argv[optind] ? argv[optind] : "@TERMUX_PREFIX@/etc/ethers");
|
||||
break;
|
||||
|
||||
case 3: /* delete an ARP entry from the cache */
|
@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://net-tools.sourceforge.net/
|
||||
TERMUX_PKG_DESCRIPTION="Configuration tools for Linux networking"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=1.60.2017.02.21
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
local commit=479bb4a7e11a4084e2935c0a576388f92469225b
|
||||
TERMUX_PKG_SHA256=7e9f8e8dcbabed0c8eeb976100496567abae7ac9d92c72cebd1a9d965473e943
|
||||
# We use a mirror to avoid using
|
||||
|
12
packages/net-tools/lib-pathnames.h.patch
Normal file
12
packages/net-tools/lib-pathnames.h.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr net-tools/lib/pathnames.h net-tools.mod/lib/pathnames.h
|
||||
--- net-tools/lib/pathnames.h 2017-02-21 20:24:32.000000000 +0200
|
||||
+++ net-tools.mod/lib/pathnames.h 2019-03-01 19:05:45.935478227 +0200
|
||||
@@ -47,7 +47,7 @@
|
||||
#define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6"
|
||||
#define _PATH_PROCNET_DEV "/proc/net/dev"
|
||||
#define _PATH_PROCNET_RARP "/proc/net/rarp"
|
||||
-#define _PATH_ETHERS "/etc/ethers"
|
||||
+#define _PATH_ETHERS "@TERMUX_PREFIX@/etc/ethers"
|
||||
#define _PATH_PROCNET_ROSE "/proc/net/rose"
|
||||
#define _PATH_PROCNET_ROSE_NEIGH "/proc/net/rose_neigh"
|
||||
#define _PATH_PROCNET_ROSE_NODES "/proc/net/rose_nodes"
|
@ -1,5 +1,6 @@
|
||||
--- ./nameif.c 2017-02-21 23:54:32.000000000 +0530
|
||||
+++ ../nameif.c 2017-04-09 14:47:40.889765378 +0530
|
||||
diff -uNr net-tools/nameif.c net-tools.mod/nameif.c
|
||||
--- net-tools/nameif.c 2017-02-21 20:24:32.000000000 +0200
|
||||
+++ net-tools.mod/nameif.c 2019-03-01 19:02:26.447822359 +0200
|
||||
@@ -10,7 +10,7 @@
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
@ -9,3 +10,12 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "net-support.h"
|
||||
#include "util.h"
|
||||
|
||||
-const char default_conf[] = "/etc/mactab";
|
||||
+const char default_conf[] = "@TERMUX_PREFIX@/etc/mactab";
|
||||
const char *fname = default_conf;
|
||||
int use_syslog;
|
||||
int ctl_sk = -1;
|
||||
|
12
packages/net-tools/rarp.c.patch
Normal file
12
packages/net-tools/rarp.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr net-tools/rarp.c net-tools.mod/rarp.c
|
||||
--- net-tools/rarp.c 2017-02-21 20:24:32.000000000 +0200
|
||||
+++ net-tools.mod/rarp.c 2019-03-01 19:06:09.028923071 +0200
|
||||
@@ -178,7 +178,7 @@
|
||||
fprintf(stderr, _("Usage: rarp -a list entries in cache.\n"));
|
||||
fprintf(stderr, _(" rarp -d <hostname> delete entry from cache.\n"));
|
||||
fprintf(stderr, _(" rarp [<HW>] -s <hostname> <hwaddr> add entry to cache.\n"));
|
||||
- fprintf(stderr, _(" rarp -f add entries from /etc/ethers.\n"));
|
||||
+ fprintf(stderr, _(" rarp -f add entries from $PREFIX/etc/ethers.\n"));
|
||||
fprintf(stderr, _(" rarp -V display program version.\n\n"));
|
||||
|
||||
fprintf(stderr, _(" <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"), DFLT_HW);
|
12
packages/net-tools/slattach.c.patch
Normal file
12
packages/net-tools/slattach.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr net-tools/slattach.c net-tools.mod/slattach.c
|
||||
--- net-tools/slattach.c 2017-02-21 20:24:32.000000000 +0200
|
||||
+++ net-tools.mod/slattach.c 2019-03-01 21:54:06.558251056 +0200
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "util.h"
|
||||
|
||||
#ifndef _PATH_LOCKD
|
||||
-#define _PATH_LOCKD "/var/lock" /* lock files */
|
||||
+#define _PATH_LOCKD "@TERMUX_PREFIX@/var/lock" /* lock files */
|
||||
#endif
|
||||
#ifndef _UID_UUCP
|
||||
#define _UID_UUCP "uucp" /* owns locks */
|
Loading…
Reference in New Issue
Block a user