Subject: misc/13804: "No such file or directory" for first few days in /etc/daily.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hamajima@nagoya.ydc.co.jp>
List: netbsd-bugs
Date: 08/28/2001 11:53:39
>Number: 13804
>Category: misc
>Synopsis: "No such file or directory" for first few days in /etc/daily.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 27 19:49:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Katsuomi Hamajima
>Release: NetBSD 1.5.2
>Organization:
>Environment:
System: NetBSD atom 1.5.2 NetBSD 1.5.2 (ATOM) #27: Mon Aug 20 16:52:08 JST 2001 hamajima@atom:/usr/src/sys/arch/i386/compile/ATOM i386
>Description:
move /var/account/acct.* in /etc/daily, but do not exist for first few days.
>How-To-Repeat:
rm /var/account/acct.*
sh /etc/daily
>Fix:
--- etc/daily.orig Fri Aug 25 12:05:19 2000
+++ etc/daily Tue Aug 28 11:47:56 2001
@@ -116,9 +116,9 @@
if checkyesno purge_accounting && [ -f /var/account/acct ]; then
echo ""
echo "Purging accounting records:"
- mv /var/account/acct.2 /var/account/acct.3
- mv /var/account/acct.1 /var/account/acct.2
- mv /var/account/acct.0 /var/account/acct.1
+ mv /var/account/acct.2 /var/account/acct.3 2>/dev/null
+ mv /var/account/acct.1 /var/account/acct.2 2>/dev/null
+ mv /var/account/acct.0 /var/account/acct.1 2>/dev/null
cp /var/account/acct /var/account/acct.0
sa -sq
fi
>Release-Note:
>Audit-Trail:
>Unformatted: