On Sat, Jun 25, 2011 at 10:43 PM,  <[email protected]> wrote:
> I'm using fedora 15 here and i have a I'm having a mild problem with akmods.
> If this is the wrong mailing list for this then please tell me what the
> right one is.
> akmods seems to basically be working
> alright but,
>
>    /usr/sbin/akmods --from-init
>
> has output
>
> Checking kmods exist for 2.6.38.8-32.fc15.x86_64           [  OK  ]
>
> and exit status 128.
>
> Because of this,  the command
>
> systemctl status akmods.service
>
> results in the message
>
> Job failed. See system logs and 'systemctl status' for details.
>
> Furthermore
>
> systemctl status akmods.service
>
> results in:
> akmods.service - LSB: Builds and install new kmods from akmod packages
>       Loaded: loaded (/etc/rc.d/init.d/akmods)
>       Active: failed since Sat, 25 Jun 2011 22:21:32 -0400; 53min ago
>      Process: 3698 ExecStart=/etc/rc.d/init.d/akmods start (code=exited,
> status=128)
>       CGroup: name=systemd:/system/akmods.service
>
>
> Can anyone tell me why /usr/sbin/akmods --from-init the  wants to exit with
> exit code 128 instead of 0?
> This makes no sense when the output from
> /usr/sbin/akmods --from-init
> has [OK] at its end. 128 should indicate some degree of failure

I had a minute to look at this and you're right. I'm not sure why it's
exiting with status 128. I fixed it by editing the akmods script (it's
just a bash script) like this:

From:
finally()
{
        # remove tmpfiles
        remove_tmpdir

        # remove lockfile
        rm -f /var/cache/akmods/.lockfile

        exit ${1:-128}

To:
"""
finally()
{
        # remove tmpfiles
        remove_tmpdir

        # remove lockfile
        rm -f /var/cache/akmods/.lockfile

        exit ${1:0}
"""

I'm not a bash expert so I'm not sure what "exit ${1:-128}" does but
changing the "-128" to "0" fixed the problem.

Can anyone comment why an exit value of 128 was chosen for success?

Thanks,
Richard

Reply via email to