mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 05:51:45 -09:00
package/mariadb: fix potential error message in sysv startup script
In order to check if the initial database needs to be created, the startup
script calls ls -1 $MYSQL_LIB | wc -l to check the number of files in the
directory. If the directory does not exist, an error is printed. We fix
this by redirecting stderr to /dev/null for the ls call.
Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 22bb9b2c28)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
3f540c1bb3
commit
0a9c02a44d
@@ -21,7 +21,9 @@ wait_for_ready() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
if [ `ls -1 $MYSQL_LIB | wc -l` = 0 ] ; then
|
# stderr is redirected to prevent a warning
|
||||||
|
# if mysql lib directory doesn't exist
|
||||||
|
if [ `ls -1 $MYSQL_LIB 2> /dev/null | wc -l` = 0 ] ; then
|
||||||
printf "Creating mysql system tables ... "
|
printf "Creating mysql system tables ... "
|
||||||
$MYSQL_BIN/mysql_install_db --basedir=/usr --user=mysql \
|
$MYSQL_BIN/mysql_install_db --basedir=/usr --user=mysql \
|
||||||
--datadir=$MYSQL_LIB > /dev/null 2>&1
|
--datadir=$MYSQL_LIB > /dev/null 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user