Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 30393 - rc-service: declare -fx depinfo_ ': not a valid identifier
Summary: rc-service: declare -fx depinfo_ ': not a valid identifier
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High trivial
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-05 07:39 UTC by Eldad Zack (RETIRED)
Modified: 2003-10-07 13:25 UTC (History)
0 users

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 Eldad Zack (RETIRED) gentoo-dev 2003-10-05 07:39:48 UTC
Since I have upgraded my baselayout from 1.8.6.8 to 1.8.6.10, I am getting these
errors whenever starting or stopping services.

root#/etc/init.d/apache2 start

cat: /etc/init.d/net                            : No such file or directory
 * ERROR:  "/etc/init.d/net                             " has syntax errors in
it; not executing...
/sbin/runscript.sh: line 284: unset: `declare -fx depinfo_alsasound': not a
valid identifier
/sbin/runscript.sh: line 284: unset: `declare -fx depinfo_apache2': not a valid
identifier
/sbin/runscript.sh: line 284: unset: `declare -fx depinfo_authdaemond': not a
valid identifier

... [ repeated for each service in /etc/init.d ] ...

/sbin/runscript.sh: line 284: unset: `declare -fx depinfo_xdm': not a valid
identifier
/sbin/runscript.sh: line 284: unset: `declare -fx depinfo_xfs': not a valid
identifier
 * Starting apache2...



Reproducible: Always
Steps to Reproduce:
1./etc/init.d/<anyservice> stop|start



Expected Results:  
just * Starting apache2... 

I have found that the reason for barfing is that the substitution is incorrect -

Here is a patch that fix the problem.

--- rc-services.sh      2003-08-15 22:08:48.000000000 +0300
+++ rc-services.sh-fixed        2003-10-05 16:30:01.000000000 +0200
@@ -281,7 +281,7 @@
        do
                if [ "${x/depinfo_}" != "${x}" ]
                then
-                       unset ${x/declare -f /}
+                       unset ${x/declare -fx /}
                fi
        done
Comment 1 Eldad Zack (RETIRED) gentoo-dev 2003-10-07 13:25:26 UTC
My bad.

I've found that it was caused by a misconfiguration I've made to /etc/rc.conf
-
I defined IFS=$'\n' (and not as intended, $'\n\t ' ...)