Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 295657

Summary: sys-apps/baselayout-1.12.13: init scripts: check for root and /etc/init.d/foo status broken
Product: Gentoo Linux Reporter: Jan Kundrát (RETIRED) <jkt>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: allow-quiet-for-initscript-status.patch

Description Jan Kundrát (RETIRED) gentoo-dev 2009-12-04 13:14:58 UTC
kundratj@batsheba ~ $ /etc/init.d/sshd status
 * /sbin/runscript.sh: must be root to run init scripts

Current method is obviously broken because the $* contains the name of the whole init script. This breaks for example automated Nagios sensors checking for health of services because NRPE typically runs as a non-privileged user. Patch will be attached.
Comment 1 Jan Kundrát (RETIRED) gentoo-dev 2009-12-04 13:16:54 UTC
Created attachment 212007 [details, diff]
allow-quiet-for-initscript-status.patch
Comment 2 SpanKY gentoo-dev 2009-12-14 04:57:37 UTC
Comment on attachment 212007 [details, diff]
allow-quiet-for-initscript-status.patch

this change is just as fragile