Import of pkgsrc-2015Q1

This commit is contained in:
2016-01-21 23:40:00 +01:00
committed by sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870539 additions and 795424 deletions
+3
View File
@@ -0,0 +1,3 @@
pidof finds the process id's (pids) of the named programs. It prints
those id's on the standard output. This Linux pidof port is intended to
help porting scripts.
+26
View File
@@ -0,0 +1,26 @@
# $NetBSD: Makefile,v 1.1 2014/07/22 08:09:16 manu Exp $
DISTNAME= sysvinit-2.88dsf
PKGNAME= ${DISTNAME:S/sysvinit/pidof/}
CATEGORIES= sysutils
MASTER_SITES= http://download.savannah.gnu.org/releases/sysvinit/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://download.savannah.gnu.org/releases/sysvinit/
COMMENT= Linux pidof(8) command
LICENSE= gnu-gpl-v2
USE_TOOLS+= gmake
BUILD_DIRS= src
BUILD_TARGET= killall5
AUTO_MKDIRS= yes
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/killall5 \
${DESTDIR}${PREFIX}/sbin/pidof
${INSTALL_MAN} ${WRKSRC}/man/pidof.8 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
# url2pkg-marker (please do not remove this line.)
.include "../../mk/bsd.pkg.mk"
+3
View File
@@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.1 2014/07/22 08:09:17 manu Exp $
sbin/pidof
man/man8/pidof.8
+6
View File
@@ -0,0 +1,6 @@
$NetBSD: distinfo,v 1.1 2014/07/22 08:09:17 manu Exp $
SHA1 (sysvinit-2.88dsf.tar.bz2) = f2ca149df1314a91f3007cccd7a0aa47d990de26
RMD160 (sysvinit-2.88dsf.tar.bz2) = 8109e9b90caff544be4a3b37c808baf16914d0bd
Size (sysvinit-2.88dsf.tar.bz2) = 105551 bytes
SHA1 (patch-aa) = 45c9f8ebc73af24a28e511e44c5bcd9f97e9d475
+98
View File
@@ -0,0 +1,98 @@
$NetBSD: patch-aa,v 1.1 2014/07/22 08:20:24 manu Exp $
Disable the NFS code
--- src/killall5.c.orig 2014-07-01 02:01:37.000000000 +0200
+++ src/killall5.c 2014-07-03 09:53:15.000000000 +0200
@@ -42,9 +42,11 @@
*/
#include <dirent.h>
#include <errno.h>
#include <getopt.h>
+#ifdef linux
#include <mntent.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
@@ -236,8 +238,9 @@
}
return 0;
}
+#ifdef linux
/*
* Remember all NFS typed partitions.
*/
void init_nfs(void)
@@ -301,8 +304,9 @@
}
}
endmntent(mnt);
}
+#endif /* linux */
static void clear_shadow(SHADOW *restrict shadow)
{
SHADOW *s, *n, *l;
@@ -365,8 +369,9 @@
out:
return 0;
}
+#ifdef linux
/*
* Check path is located on a network based partition.
*/
int check4nfs(const char * path, char * real)
@@ -430,8 +435,9 @@
}
return 0;
}
+#endif /* linux */
int readarg(FILE *fp, char *buf, int sz)
{
int c = 0, f = 0;
@@ -607,11 +613,13 @@
p->nfs = 0;
switch (do_stat) {
+#ifdef linux
case DO_NETFS:
if ((p->nfs = check4nfs(path, buf)))
break;
+#endif
case DO_STAT:
if (stat(path, &st) != 0)
break;
p->dev = st.st_dev;
@@ -695,10 +703,12 @@
/* Try to stat the executable. */
if (prog[0] == '/') {
memset(&real[0], 0, sizeof(real));
+#ifdef linux
if (check4nfs(prog, real))
nfs++;
+#endif
if (real[0] != '\0')
prog = &real[0]; /* Binary located on network FS. */
@@ -926,10 +936,12 @@
exit(1);
}
}
+#ifdef linux
if (flags & PIDOF_NETFS)
init_nfs(); /* Which network based FS are online? */
+#endif
/* Print out process-ID's one by one. */
readproc((flags & PIDOF_NETFS) ? DO_NETFS : DO_STAT);