[Buildroot] [PATCH v3 5/8] package/mariadb: rename variable in sysv startup script

Ryan Coe bluemrp9 at gmail.com
Tue Feb 4 01:21:57 UTC 2020


This patch renames MYSQL_PID to MYSQL_PIDFILE in the startup script. This
is in anticipation for some upcoming changes.

Signed-off-by: Ryan Coe <bluemrp9 at gmail.com>
---
Changes v2 -> v3:
  - separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
  - no change
---
 package/mariadb/S97mysqld | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/mariadb/S97mysqld b/package/mariadb/S97mysqld
index 7f9ced31e9..ffd3712400 100644
--- a/package/mariadb/S97mysqld
+++ b/package/mariadb/S97mysqld
@@ -5,7 +5,7 @@
 
 MYSQL_LIB="/var/lib/mysql"
 MYSQL_RUN="/run/mysql"
-MYSQL_PID="$MYSQL_RUN/mysqld.pid"
+MYSQL_PIDFILE="$MYSQL_RUN/mysqld.pid"
 MYSQL_BIN="/usr/bin"
 
 wait_for_ready() {
@@ -41,7 +41,7 @@ start() {
 	# We don't use start-stop-daemon because mysqld has its own
 	# wrapper script.
 	printf "Starting mysql ... "
-	$MYSQL_BIN/mysqld_safe --pid-file=$MYSQL_PID --user=mysql \
+	$MYSQL_BIN/mysqld_safe --pid-file=$MYSQL_PIDFILE --user=mysql \
 		> /dev/null 2>&1 &
 	wait_for_ready
 	[ $? = 0 ] && echo "OK" || echo "FAIL"
@@ -49,8 +49,8 @@ start() {
 
 stop() {
 	printf "Stopping mysql ... "
-	if [ -f $MYSQL_PID ]; then
-		kill `cat $MYSQL_PID` > /dev/null 2>&1
+	if [ -f $MYSQL_PIDFILE ]; then
+		kill `cat $MYSQL_PIDFILE` > /dev/null 2>&1
 		[ $? = 0 ] && echo "OK" || echo "FAIL"
 	else
 		echo "FAIL"
-- 
2.25.0



More information about the buildroot mailing list