Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ebegin: command not found
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
modnaruved
Apprentice
Apprentice


Joined: 21 Mar 2011
Posts: 160

PostPosted: Sat Sep 27, 2014 2:10 pm    Post subject: ebegin: command not found Reply with quote

Hi!

Im just run simple init script like this:

Code:

#!/sbin/runscript
# ----------------------------------------------------------------------
# File:    /etc/init.d/ora.database
# Purpose:  Startup Oracle Database(s) defined in /etc/oratab
# ----------------------------------------------------------------------

depend() {
    need net logger hostname clock
}

start() {
    source /etc/profile.env

    ebegin "Starting Service"
    # run service
    eend $? "Failed to start Service."
}

stop() {
    source /etc/profile.env
 
   ebegin "Stopping Service"
    # run stop service
    eend $? "Failed to stop Service."
}   



Its very common snippet and described in https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4

Ive get error message that iebegin, eend not available. What is wrong?
Back to top
View user's profile Send private message
modnaruved
Apprentice
Apprentice


Joined: 21 Mar 2011
Posts: 160

PostPosted: Sat Sep 27, 2014 2:37 pm    Post subject: Reply with quote

It seems, that command:

source /etc/profile.env

is odd, hope is quite and safe to remove it for logic of adapted (old) script. 99local do this job I hope.

Seems, that problem is resolved.

Thanks.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sat Sep 27, 2014 4:12 pm    Post subject: Reply with quote

For the explanation: Probably sourcing /etc/profile.env changes your PATH.
During execution of init-scripts, there is a special PATH which contains commands like ebegin.
Back to top
View user's profile Send private message
modnaruved
Apprentice
Apprentice


Joined: 21 Mar 2011
Posts: 160

PostPosted: Sat Sep 27, 2014 4:33 pm    Post subject: Reply with quote

mv wrote:
For the explanation: Probably sourcing /etc/profile.env changes your PATH.
During execution of init-scripts, there is a special PATH which contains commands like ebegin.


Ok. I see. Expected that PATH of "efunctions" independent.

Thanks.

I try adaptee this old script from topic about oracle 11g post install stuff:

Thanks to s.hase https://forums.gentoo.org/profile.php?mode=viewprofile&u=80950 for his post notices:

https://forums.gentoo.org/viewtopic-t-581228-start-0.html (see post code for /etc/init.d/ora.listener: )

for starting services.
There used source /etc/profile.env
I just comment this line: env setting for ORACLE already defined correctly.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum