![]() |
|
|||||||
| OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|||
|
hi, i'm a newbie on this OpenBSD (version 4.7). i've built an ONMP (OpenBSD-Nginx-MySQL-PHP). i've installed MySQL (using `pkg_add mysql-server`), and i've put it on rc.local like this:
Code:
if [ X"${mysql}" == X"YES" -a -x /usr/local/bin/mysqld_safe ] ; then
su -c _mysql root -c `/usr/local/bin/mysqld_safe &` > /dev/null & echo -
n “ mysqld”
fi
Code:
$ sudo su -c _mysql root -c `/usr/local/bin/mysqld_safe &` > /dev/null |
|
|||
|
I think the condition X"${mysql}" == X"YES" is only true if you also created a conf file containing mysql=YES. Just like rc works with rc.conf.
In my rc.local I only use the condition -x /usr/local/bin/mysqld_safe so: if [ -x /usr/local/bin/mysqld_safe ] ; then su -c _mysql root -c `/usr/local/bin/mysqld_safe &` > /dev/null & echo - n “ mysqld” fi |
|
|||
|
Quote:
Code:
mysql=YES
|
|
||||
|
Only applications included with the OS use variables in the configuration files (rc.conf, rc.conf.local) with rc(8).
3rd party ports and packages do not use conf variables. Standard practice is to use the script example provided in /usr/local/share/doc/mysql/README.OpenBSD.
__________________
OpenBSD LiveCDs/LiveDVDs |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| log from rc.conf.local and rc.local | sdesilet | OpenBSD General | 1 | 21st January 2010 01:37 AM |
| /usr/local/etc/periodic does not exist ??? | sniper007 | FreeBSD General | 3 | 3rd November 2009 06:36 AM |
| local dns (dnsmasq) | bsdperson | FreeBSD Ports and Packages | 3 | 3rd September 2008 06:48 AM |
| proxy : replace gif with local gif | milo974 | OpenBSD General | 4 | 17th July 2008 06:45 AM |
| /usr/local and application directories | ducu_00 | FreeBSD Ports and Packages | 14 | 23rd May 2008 05:37 PM |