Commit b658d1f2 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #30077 from CodeJuan/master

Automatic merge from submit-queue fixed regex error, which replace 2 line in template file fixes #30074
parents b8dbb3e3 b038355c
...@@ -29,7 +29,7 @@ while read -ra LINE; do ...@@ -29,7 +29,7 @@ while read -ra LINE; do
sed -i -e "s|^bind.*$|bind ${LINE}|" ${CFG} sed -i -e "s|^bind.*$|bind ${LINE}|" ${CFG}
elif [ "$(/opt/redis/redis-cli -h $LINE info | grep role | sed 's,\r$,,')" = "role:master" ]; then elif [ "$(/opt/redis/redis-cli -h $LINE info | grep role | sed 's,\r$,,')" = "role:master" ]; then
# TODO: More restrictive regex? # TODO: More restrictive regex?
sed -i -e "s|^.*slaveof.*$|slaveof ${LINE} ${PORT}|" ${CFG} sed -i -e "s|^# slaveof.*$|slaveof ${LINE} ${PORT}|" ${CFG}
fi fi
done done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment