View previous topic :: View next topic |
Author |
Message |
3fps n00b
Joined: 14 Jul 2002 Posts: 16
|
Posted: Sat Aug 24, 2002 3:46 pm Post subject: runscript quiestion |
|
|
if i have added own functions to a runscript like;
Code: |
depend() {
need foo
}
opts="${opts} bar"
bar() {
echo "asdasd"
}
|
how do i execute that function from within the script ? like if i want "start()" to run "bar()"?
i tried somthing like:
but that gave me syntax errors
do i have to use
Code: |
start() {
/etc/init.d/scriptname bar
}
|
? |
|
Back to top |
|
|
Naan Yaar Bodhisattva
Joined: 27 Jun 2002 Posts: 1549
|
Posted: Sat Aug 24, 2002 4:03 pm Post subject: |
|
|
You need to make that:
Also, this is a very good guide to bash scripting. |
|
Back to top |
|
|
|