From eac2fbdb83a2303c95ad1513a0f0a68086d2daa0 Mon Sep 17 00:00:00 2001 From: bouyer Date: Tue, 28 Sep 1999 14:53:17 +0000 Subject: [PATCH] Add support for $defcorename --- etc/rc | 8 +++++++- etc/rc.conf | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/etc/rc b/etc/rc index ca34496dc774..3f1f630648e2 100644 --- a/etc/rc +++ b/etc/rc @@ -1,4 +1,4 @@ -# $NetBSD: rc,v 1.131 1999/09/16 11:00:44 darrenr Exp $ +# $NetBSD: rc,v 1.132 1999/09/28 14:53:17 bouyer Exp $ # originally from: @(#)rc 8.2 (Berkeley) 3/17/94 # System startup script run by init on autoboot @@ -316,6 +316,12 @@ if checkyesno lkm && [ -f /etc/rc.lkm ]; then . /etc/rc.lkm fi +# if $defcorename is set, change it here. +if [ -n "$defcorename" ]; then + echo -n 'setting default core name template: ' + sysctl -w kern.defcorename=$defcorename +fi + # if $securelevel is set, change it here, else if it is 0, change # it to 1 here, before we start login services. if [ -n "$securelevel" ]; then diff --git a/etc/rc.conf b/etc/rc.conf index b0d1261177a2..929248fd4325 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -1,4 +1,4 @@ -# $NetBSD: rc.conf,v 1.57 1999/09/03 13:40:16 itojun Exp $ +# $NetBSD: rc.conf,v 1.58 1999/09/28 14:53:17 bouyer Exp $ # # see rc.conf(5) for more information. @@ -41,6 +41,11 @@ savecore=YES savecore_flags="" update_motd=YES # updates /etc/motd dmesg=YES dmesg_flags="" # write /var/run/dmesg.boot +# default core name template. If $defcorename is non-empty, this value will be +# used for core dumps names for programs that didn't get their per-process +# template set (see sysctl(3) and sysctl(8)). +defcorename="" + # Security setting. If $securelevel is non-empty, the system securelevel # is set to this value early in the boot sequence. Otherwise the default # action is taken (see init(8)).