Package: sysvinit
Version: 2.86.ds1-61
Severity: minor
Tags: patch

accton now needs the parameter "off" to stop accounting. The default action is 
not implemented anymore, which now gives the following error messages:

accton: no arguments
Usage: accton [OPTION] on|off|ACCOUNTING_FILE
Try 'accton --help' for more information.

My simple testcase: use init=/bin/bash as init process and then call
shutdown -fPnh now

Anyway, in my opinion it would be better to use the acct() call direct instead 
of spawning a new process. This implements the attached patch.

--- src/shutdown.c	2009-07-11 10:52:52.000000000 +0200
+++ src/shutdown_my.c	2009-07-11 11:03:49.000000000 +0200
@@ -331,7 +331,9 @@ void fastdown()
 	write_wtmp("shutdown", "~~", 0, RUN_LVL, "~~");
 
 	/* This is for those who have quota installed. */
-	spawn(1, "accton", NULL);
+#if _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
+	if (acct(NULL)) perror("acct: ");
+#endif
 	spawn(1, "quotaoff", "-a", NULL);
 
 	sync();

Reply via email to