Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548414 - dev-util/jenkins-bin-1.610: bashism in the logrotate snippet
Summary: dev-util/jenkins-bin-1.610: bashism in the logrotate snippet
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Manuel Rüger (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-02 18:00 UTC by Consus
Modified: 2015-05-03 16:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Consus 2015-05-02 18:00:39 UTC
In postrotate section you have a line 

    [ -r /etc/conf.d/jenkins ] && source /etc/conf.d/jenkins

that contains ``source'' shell built-in available only in bash. This results in ignoring Jenkins configuration file on systems with dash, or other POSIX shell implementation.

On a side note: why do you need this: 

        if [ -s /var/run/jenkins/jenkins.pid ]; then
            JPID=`cat /var/run/jenkins/jenkins.pid`
            test -n "`find /proc/$JPID -maxdepth 0 -user ${RUN_AS:-jenkins} 2>/dev/null`" && kill -s ALRM $JPID || :
        fi

Why not pkill?

Reproducible: Always
Comment 1 Manuel Rüger (RETIRED) gentoo-dev 2015-05-03 09:37:38 UTC
CC'ing the original author of the logrotate file.
Comment 2 Manuel Rüger (RETIRED) gentoo-dev 2015-05-03 16:17:54 UTC
Replaced "source" with "." in -r1.logrotate.