Bug 83625

Summary: 'dmesg -n $LOGLEVEL' get overwriten by syslog service
Product: [Retired] Red Hat Linux Reporter: Oliver Schulze L. <oliver>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED NOTABUG QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-02-06 15:58:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Oliver Schulze L. 2003-02-06 14:04:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a)
Gecko/20021207 Phoenix/0.5

Description of problem:
The setup of the console message level is overwirten by the syslog service.
The initial setup of the console si done in:
/etc/rc.sysinit
with the command:
# Fix console loglevel
/bin/dmesg -n $LOGLEVEL

but, later with the syslog is started, the configuration done in /etc/rc.sysinit
is lost.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. configure syslog to start at boot time
2. reboot your system
3. run cat /proc/sys/kernel/printk
    

Actual Results:  cat /proc/sys/kernel/printk
returns
6       4       1       7

Expected Results:  cat /proc/sys/kernel/printk
should returns
3       4       1       7

The number 3 is configured in the variable:
LOGLEVEL=3
in the file:
/etc/sysconfig/init


Additional info:

Maybe the console dmesh initialization can be run from rc.local
or at the end of /etc/init.d/syslog

Comment 1 Oliver Schulze L. 2003-02-06 14:28:01 UTC
Found a nice solution:
Set this variable:
KLOGD_OPTIONS="-x -c 3"
in this file:
/etc/sysconfig/syslog
The key part is to add "-c 3" to the variable KLOGD_OPTIONS

This solution makes variable LOGLEVEL in:
/etc/sysconfig/init
obsolete only when the service syslog is used.

Comment 2 Bill Nottingham 2003-02-06 15:58:24 UTC
The default /etc/sysconfig/init says that syslogd will reset the console
loglevel; hence, this isn't really a bug.

Comment 3 Oliver Schulze L. 2003-02-06 16:02:23 UTC
I think the bug is only described in:
/etc/sysconfig/init

The issue is not solved in /etc/sysconfig/init, thats why I opened the bug.
Because initscripts fails to set the console loglevel.

It is a bug or at least a feature that does not work.

Please let me know if there will be a solucion for setting the console level in
all cases. (when syslog is used)