Description: Move ACCTDIR to /var/run/atop. Read from /var/log/account/pacct
Origin: other
Forwarded: no
--- a/acctproc.c
+++ b/acctproc.c
@@ -132,7 +132,7 @@
 #include "photoproc.h"
 #include "acctproc.h"
 
-#define	ACCTDIR		"/tmp/atop.d"
+#define	ACCTDIR		"/var/run/atop"
 #define	ACCTFILE	"atop.acct"
 #define	ACCTENV		"ATOPACCT"
 
@@ -150,6 +150,7 @@
 	char		*name;
 	struct stat	stat;
 } pacctadm[] = {
+	{ "/var/log/account/pacct",	{0, }, },
 	{ "/var/log/pacct",		{0, }, },
 	{ "/var/account/pacct",		{0, }, }
 };
@@ -336,7 +337,7 @@
 	if (semctl(semid, 1, GETVAL, 0) == SEMTOTAL)
 	{
 		/*
-		** create a new separate directory below /tmp
+		** create a new separate directory below /var/run
 		** for the accounting file;
 		** if this directory exists (e.g. previous atop-run killed)
 		** it will be cleaned and newly created
