Bug 541368 - crond initscript lsb compliance
Summary: crond initscript lsb compliance
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: cronie
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: InitScriptsProject 584006
TreeView+ depends on / blocked
 
Reported: 2009-11-25 17:37 UTC by Yulia Kopkova
Modified: 2010-04-20 13:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 584006 (view as bug list)
Environment:
Last Closed: 2009-11-27 09:00:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.