From a74bbb49212bbfd55d01b6f020f2ec0226dec26a Mon Sep 17 00:00:00 2001 From: rpe <> Date: Tue, 27 Sep 2016 20:18:34 +0000 Subject: [PATCH] Run acpidump(8) at system startup and store ACPI tables in the /var/db/acpi directory. Later sendbug(1) will use this data in bug reports. That directory is created by mtree. idea from and OK deraadt OK kettenis --- src/etc/mtree/4.4BSD.dist | 4 +++- src/etc/rc | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/etc/mtree/4.4BSD.dist b/src/etc/mtree/4.4BSD.dist index 9935ca4e..6fb1f79a 100644 --- a/src/etc/mtree/4.4BSD.dist +++ b/src/etc/mtree/4.4BSD.dist @@ -1,4 +1,4 @@ -# $OpenBSD: 4.4BSD.dist,v 1.289 2016/09/07 18:31:00 jmc Exp $ +# $OpenBSD: 4.4BSD.dist,v 1.290 2016/09/27 20:18:34 rpe Exp $ /set type=dir uname=root gname=wheel mode=0755 @@ -623,6 +623,8 @@ var # ./var/db db + acpi + .. ldap mode=0700 .. ns diff --git a/src/etc/rc b/src/etc/rc index 69b315d2..d0605a21 100644 --- a/src/etc/rc +++ b/src/etc/rc @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.486 2016/07/10 09:08:18 rpe Exp $ +# $OpenBSD: rc,v 1.487 2016/09/27 20:18:34 rpe Exp $ # System startup script run by init on autoboot or after single-user. # Output and error are redirected to console by init, and the console is the @@ -451,6 +451,11 @@ if [[ -d /var/crash ]]; then savecore $savecore_flags /var/crash fi +# Store ACPI tables in /var/db/acpi to be used by sendbug(1). +if [[ -x /usr/sbin/acpidump ]]; then + acpidump -o /var/db/acpi/ +fi + if [[ $check_quotas == YES ]]; then echo -n 'checking quotas:' quotacheck -a