X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fbootscripts%2Fmysql;h=d2619392603719a9d8f313e7495f82ad35ef1ffc;hb=2121ae9154ff063eef0defe0a9208663062a2d01;hp=3c5f9352991cc6c10f43b9f76956491bd4f49f9d;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage3/bootscripts/mysql b/stage3/bootscripts/mysql index 3c5f935..d261939 100755 --- a/stage3/bootscripts/mysql +++ b/stage3/bootscripts/mysql @@ -14,15 +14,15 @@ mysql_start() if [ -f "$pid_file" ]; then if /bin/ps p `cat $pid_file` | grep mysqld >/dev/null; then # Warning, running... - return 0 + return ${EXIT_CODE_WARNING} else rm -f $pid_file if [ -f $pid_file ]; then - return 1 + return ${EXIT_CODE_FAILURE} fi fi fi - + /usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null & return $? } @@ -39,28 +39,28 @@ mysql_stop() sleep 1 done if [ -s $pid_file ]; then - return 1 + return ${EXIT_CODE_FAILURE} fi return 0 else # print_status warning not_running - return 1 + return ${EXIT_CODE_WARNING} fi } case "$1" in start) - cmd_run_log_box "MySQL start" mysql_start + cmd_run_log_box_warn "MySQL start" mysql_start ;; - + stop) - cmd_run_log_box "MySQL stop" mysql_stop + cmd_run_log_box_warn "MySQL stop" mysql_stop ;; - + reload) - cmd_run_log_box "MySQL reload" reloadproc mysqld + cmd_run_log_box_warn "MySQL reload" reloadproc mysqld ;; - + restart) $0 stop sleep 1 @@ -70,7 +70,7 @@ case "$1" in status) statusproc mysqld ;; - + *) echo "Usage: $0 {start|stop|reload|restart|status}" exit ${EXIT_CODE_FAILURE}