Mailinglist Archive: opensuse-bugs (12935 mails)

< Previous Next >
[Bug 463586] New: MySQL init script fails to find itsself
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Mon, 5 Jan 2009 09:08:28 -0700 (MST)
  • Message-id: <bug-463586-21960@xxxxxxxxxxxxxxxxxxxxxxxxx/>
https://bugzilla.novell.com/show_bug.cgi?id=463586


Summary: MySQL init script fails to find itsself
Product: openSUSE 11.1
Version: Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Basesystem
AssignedTo: mmarek@xxxxxxxxxx
ReportedBy: suse-beta@xxxxxxxxx
QAContact: qa@xxxxxxx
Found By: ---


The MySQL init script fails to find itsself in some cases:

root@cboltz:/etc/init.d> ./mysql start
pwd: /usr
/mysql: line 233: ./mysql: No such file or directory
Starting service MySQL done

(It works when called as "rcmysql status", because rcmysql is in $PATH.)

The relevant code section in /etc/init.d/mysql is:

# Safeguard (relative paths, core dumps..)
cd $basedir

case "$1" in
start)
# exit gracefully, if we are already running
echo "pwd: `pwd`" ### added for debugging
$0 status >/dev/null && echo -n "Starting service MySQL " && \
rc_status -v && rc_exit

As you can see in the output above, the script cd's to /usr (the default value
of $basedir) before trying to execute itsself with "$0 status".
(Un?)fortunately ./mysql is no longer working in /usr .

Please find a better (and working ;-) way to find out the status, or call "cd"
at a later point.

Note: This affects at least 11.0 and 11.1 (I did not test other versions.)


--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >