There was a dangling 'fi' in previous version.  Here
is the corrected patch:

--- acct.cron.daily     2015-06-15 11:18:29.527749598 -0400
+++ acct.cron.daily.new 2015-06-16 11:02:40.215254804 -0400
@@ -15,7 +15,16 @@
 savelog -g adm -m 0640 -u root -c "${ACCT_LOGGING}" /var/log/account/pacct > 
/dev/null
 
 # Restart acct
-invoke-rc.d acct restart > /dev/null
+#
+# Kernel may have open file handle on the old pacct file
+# so keep stopping and starting acct until new records are
+# written to the new account file
+#
+ACCTSIZE=$(ls -l /var/log/account/pacct | awk '{print $5}') 
+while [ $ACCTSIZE -eq 0  ];do
+    invoke-rc.d acct restart > /dev/null
+    ACCTSIZE=$(ls -l /var/log/account/pacct | awk '{print $5}') 
+done
 
 # This is needed because accton.c returns errno
 exit 0


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to