Bug 541368

Summary: crond initscript lsb compliance
Product: [Fedora] Fedora Reporter: Yulia Kopkova <ykopkova>
Component: cronieAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: mmaslano, pertusus, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 584006 (view as bug list) Environment:
Last Closed: 2009-11-27 09:00:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 521669, 584006    

Description Yulia Kopkova 2009-11-25 17:37:57 UTC
Description of problem:

According to https://fedoraproject.org/wiki/Packaging/SysVInitScript cronie
component init scripts have lsb compliance issue:

Init script should return code "4" if restarting service under
nonprivileged user:
# su testuserqa -c "service crond restart"; echo $?
Stopping crond:                                            [FAILED]
Starting crond: crond: can't open or create /var/run/crond.pid: Permission denied
                                                           [FAILED]
1
now: 1 
expected: 4

Comment 1 Marcela Mašláňová 2009-11-27 08:55:22 UTC
Would be great if someone add this 'code 4' into the manual because I don't see it there. In example should be:
start() {
    if [ $UID -ne 0 ] ; then
        echo "User has insufficient privilege."
        exit 4
    fi
    [ -x $exec ] || exit 5
    [ -f $config ] || exit 6
...

Comment 2 Marcela Mašláňová 2009-11-27 09:00:13 UTC
Solved in upstream - commit 37710f64c51c8a794e0d89683ed1ee5b71274e5a

Comment 3 Tomas Mraz 2009-11-27 09:02:38 UTC
I'd probably add it to stop() as well.

Comment 4 Marcela Mašláňová 2009-11-27 09:11:25 UTC
(In reply to comment #3)
> I'd probably add it to stop() as well.  
Good idea,
commit 8898b7040109093af1181cc947a5aa6943a8648d