Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81554 - a possibly broken runlevel init file for festival-1.4.3-r2
Summary: a possibly broken runlevel init file for festival-1.4.3-r2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-10 16:43 UTC by Christopher Zapart
Modified: 2005-02-11 02:49 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 Christopher Zapart 2005-02-10 16:43:11 UTC
It seems that the file /etc/init.d/festival contains a typo which prevents it
from correctly starting and stopping the festival server, and therefore also
prevents it from running /etc/festival/server.scm on startup.

Currently the start() function reads
start() {
        ebegin "Starting festival"
        start-stop-daemon --start --quiet --background --make-pidfile --pidfile /var/run/festival.pid \
                --exec /usr/bin/festival -- --server -b /etc/festival/server.scm
        eend $?
}

but this results in the /etc/festival/server.scm not being executed. No
matter what is put in there, what voice is changed, it has no effect.

The fix is to remove a spurious "\" before "--exec" in the start() so that the new version reads
start() {
        ebegin "Starting festival"
        start-stop-daemon --start --quiet --background --make-pidfile --pidfile /var/run/festival.pid --exec /usr/bin/festival -- --server -b /etc/festival/server.scm
        eend $?
}


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Christopher Zapart 2005-02-11 02:18:06 UTC
And another question is why is there "--" before "--server" not followed by any flag in the options passed
 to festival? Either some option is missing or the extra "--" perhaps could be deleted
 as it is only confusing to the festival when parsing it.

/usr/bin/festival -- --server -b /etc/festival/server.scm
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2005-02-11 02:38:19 UTC
That \ escapes the newline.  If it was a problem with that, /usr/bin/festival wouldn't even run.  And it's working foe me... did you perhaps not restart he festival server after changeing /etc/festival/server.scm?
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2005-02-11 02:40:09 UTC
the options following the -- are options passed to the --exec arg (ie, they are options for festival rather than start-stop-daemon).  Therefore, the festival command being executed by the script is:

usr/bin/festival --server -b /etc/festival/server.scm
Comment 4 Christopher Zapart 2005-02-11 02:49:54 UTC
Yes I thought "\" was for breaking a new line but somehow this was the only way
to get the script to work properly on my machine (it's not a strange PC in any way!).

Actually restarting the festival with the init script following any changes, or even after
not making any changes was causing the start-stop daemon to fail to kill the pid of
the festival.

I have now come back to using the original festival init script (with "\") and it seems
to be working fine. It is able to start/stop/restart festival without any incidents
and the script server.scm is being executed OK ( I know this because I've put an entry
to say "Hello there" everytime it is run).

So in short I'm changing the status of the "bug" to fixed as the original script is now
 working correctly. 

Perhaps it was all late in the evening/at night and I might have
done something wrong like misstyping something. In an effort to get festival server
to execute correctly I was playing with running the start-stop daemon manually from
the command line. Maybe the mixture of using both the init.d/festival  and hand-modified
start-stop daemons was a deadly one! But it's working now as it should so I'm sorry
for bothering you/worrying you!

Regards
Chris