View previous topic :: View next topic |
Author |
Message |
modnaruved Apprentice
Joined: 21 Mar 2011 Posts: 160
|
Posted: Sat Sep 27, 2014 2:10 pm Post subject: ebegin: command not found |
|
|
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 |
|
|
modnaruved Apprentice
Joined: 21 Mar 2011 Posts: 160
|
Posted: Sat Sep 27, 2014 2:37 pm Post subject: |
|
|
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 |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Sat Sep 27, 2014 4:12 pm Post subject: |
|
|
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 |
|
|
modnaruved Apprentice
Joined: 21 Mar 2011 Posts: 160
|
Posted: Sat Sep 27, 2014 4:33 pm Post subject: |
|
|
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 |
|
|
|