home | list info | list archive | date index | thread index

[OCLUG-Tech] am i just misunderstanding how the "source" command works?

  • Subject: [OCLUG-Tech] am i just misunderstanding how the "source" command works?
  • From: "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca>
  • Date: Sat, 15 Mar 2014 08:08:01 -0400 (EDT)
  currently playing with fedora (pre-21) rawhide, went to start
mariadb server:

  # systemctl start mariadb-server

and got (from output of "journalctl"):

mariadb-check-socket[3942]: /usr/libexec/mariadb-check-socket: line 8: ./mariadb-scripts-common: No such file or directory
systemd[1]: mariadb.service: control process exited, code=exited status=1
systemd[1]: Failed to start MariaDB database server.

  so i checked the script /usr/libexec/mariadb-check-socket and, sure
enough, line 8:

  source ./mariadb-scripts-common

but i'm fairly sure the "source" command uses the PATH variable to
find scripts to source, and there's no guarantee the above would work,
even when that "common" script to be sourced is in the same directory
as the sourcing script, isn't that correct?

  as a hacky test, i edited the sourcing script and changed that line
to:

  source /usr/libexec/mariadb-scripts-common

at which point that source operation worked, as i expected it would.

  the above strikes me as simply a bug ... am i missing something here
that would allow the original sourcing script to work properly? i'm
about ready to file a bug report.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================