[lug] Scripting something that relies on pwd
John Starkey
jstarkey at advancecreations.com
Mon Feb 19 22:42:30 MST 2001
The "start_mysql" script is the same one i created and it's not working.
Same result
bin/safe_mysql: No such file or directory.
Thanks.
John
Tkil wrote:
> >>>>> "John" == John Starkey <jstarkey at advancecreations.com> writes:
>
> John> I need to start mysql on boot and it's only allowing me to do so
> John> from it's parent dir. I've tried adding to rc.local (when it was
> John> running at boot) and adding a script in the mysql parent
> John> dir. But that didn't work. Do i need to chroot when i do this?
> John> If so , how do i get back out for the rest of the boot? If not.
> John> Anyone know how i can do this?
>
> typically, you start a sub-process with a different working directory
> by using a subshell, invoked with parentheses:
>
> $ ( cd /path/to/wherever; ./bin/run_me & )
>
> (maybe put the ampersand outside the parens?) this should work in
> rc.local as well.
>
> in the case of mysql in particular, it ships with a script that can be
> used with the sysv-init style /etc/rc.d/* directories, and i've never
> had a problem with cwd using that script.
>
> t.
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
More information about the LUG
mailing list