packages/utils/mariadb/patches/190-replace-hostname-in-mysqld_safe.patch
Ilya Lipnitskiy 5d8d4fbbcb
treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00

29 lines
791 B
Diff

--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -244,7 +244,7 @@ wsrep_recover_position() {
return 1
fi
- local wr_pidfile="$DATADIR/"`@HOSTNAME@`"-recover.pid"
+ local wr_pidfile="$DATADIR/"$(uci get 'system.@system[0].hostname')"-recover.pid"
local wr_options="--disable-log-error --pid-file='$wr_pidfile'"
@@ -664,7 +664,7 @@ then
* ) err_log="$DATADIR/$err_log" ;;
esac
else
- err_log=$DATADIR/`@HOSTNAME@`.err
+ err_log=$DATADIR/$(uci get 'system.@system[0].hostname').err
fi
fi
@@ -743,7 +743,7 @@ fi
if test -z "$pid_file"
then
- pid_file="`@HOSTNAME@`.pid"
+ pid_file="$(uci get 'system.@system[0].hostname').pid"
fi
# MariaDB wants pid file without datadir
append_arg_to_args "--pid-file=$pid_file"