Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 347895 - amavisd-new `debug-sa' is not a valid identifier message when executing init script
Summary: amavisd-new `debug-sa' is not a valid identifier message when executing init ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-06 11:24 UTC by Reuben Farrelly
Modified: 2010-12-07 10:36 UTC (History)
0 users

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


Attachments
emerge --info (emerge-info.txt,4.85 KB, text/plain)
2010-12-06 11:25 UTC, Reuben Farrelly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Farrelly 2010-12-06 11:24:09 UTC
I've just given the 2.7.0_pre9 ebuild a go from Gentoo Portage and I'm having a small issue with it:
Referring to the ebuild 2.7.0_pre9 ebuild in portage, there appears to be an issue with it when attempting to execute the init script"

tornado ~ # /etc/init.d/amavisd status
/etc/init.d/amavisd: line 71: `debug-sa': not a valid identifier
tornado ~ #

This occurs with both a status argument as well as a start or stop request.

The init script itself is 71 lines long, and I've verified that the init script is untampered with by verifying the installed init script with an md5sum against the one in portage.

If I comment out the debug-sa() section in the init script it works perfectly - this obviously isn't a proper fix but suggests that there is an issue somewhere with the debug statement.

As a test I also modified the name of the function to 'debug-saaa' and the result of executing the init script is then:

/etc/init.d/amavisd: line 71: `debug-saaa': not a valid identifier 

Suggests that the name itself may be a part of the issue.



Reproducible: Always

Steps to Reproduce:
1. Emerge the hard masked package amavisd-new-2.7.0_pre9
2. Attempt to run /etc/init.d/amavisd-new status, start or stop




Workaround is to hash out the offending section of the init script
Comment 1 Reuben Farrelly 2010-12-06 11:25:02 UTC
Created attachment 256488 [details]
emerge --info

emerge --info for reference
Comment 2 Eray Aslan gentoo-dev 2010-12-06 13:02:43 UTC
I cannot reproduce this.  Can you please post the output of

/etc/init.d/amavisd --debug debug-sa

Thank you.
Comment 3 Reuben Farrelly 2010-12-07 00:30:29 UTC
tornado ~ # /etc/init.d/amavisd --debug debug-sa
+ _conf_d=/etc/init.d/../conf.d
+ _c=amavisd
+ '[' -n amavisd -a amavisd '!=' amavisd ']'
+ unset _c
+ '[' -e /etc/init.d/../conf.d/amavisd.default ']'
+ '[' -e /etc/init.d/../conf.d/amavisd ']'
+ unset _conf_d
+ '[' -e /etc/rc.conf ']'
+ . /etc/rc.conf
++ rc_interactive=YES
++ rc_shell=/sbin/sulogin
++ rc_depend_strict=NO
++ unicode=NO
++ rc_tty_number=12
+ '[' -n '' ']'
+ . /etc/init.d/amavisd
++ opts=' reload debug debug-sa'
++ prog=/usr/sbin/amavisd
++ progname=amavisd-new
++ conffile=/etc/amavisd.conf
/etc/init.d/amavisd: line 71: `debug-sa': not a valid identifier
tornado ~ #
Comment 4 Eray Aslan gentoo-dev 2010-12-07 08:28:57 UTC
OK.  So, a problem with baselayout-2.

sh-4.1$ declare -F debug-sa
sh: declare: `debug-sa': not a valid identifier
sh-4.1$ declare -F debug_sa
sh-4.1$

Can you please change debug-sa to debug_sa and try again?
Comment 5 Reuben Farrelly 2010-12-07 10:15:15 UTC
Better:

debug_sa() {
        ebegin "Starting ${progname} in debug-sa mode"
        checkconfig || return 1
        "${prog}" debug-sa
        eend $?
}

results in:

tornado init.d # /etc/init.d/amavisd status
 * status: started
tornado init.d #
Comment 6 Eray Aslan gentoo-dev 2010-12-07 10:36:09 UTC
Committed.

Thank you for the bug report and testing.