File tree 7 files changed +7
-7
lines changed 7 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ oldConfigFile="$configBase.config"
202
202
newConfigFile=" $configBase .conf"
203
203
204
204
shouldWriteConfig=" $haveConfig "
205
- if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && [ ! -w " $newConfigFile " ]; then
205
+ if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && { [ ! -w " $newConfigFile " ] || [ " $( grep -sq " $newConfigFile " /proc/mounts ; echo $? ) " -eq 0 ] ; } ; then
206
206
# config file exist but it isn't writeable (e.g. Kubernetes v1.9.4+ configMap mount)
207
207
tmp=" /tmp/rabbitmq.conf"
208
208
cat " $newConfigFile " > " ${tmp} "
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ oldConfigFile="$configBase.config"
202
202
newConfigFile=" $configBase .conf"
203
203
204
204
shouldWriteConfig=" $haveConfig "
205
- if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && [ ! -w " $newConfigFile " ]; then
205
+ if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && { [ ! -w " $newConfigFile " ] || [ " $( grep -sq " $newConfigFile " /proc/mounts ; echo $? ) " -eq 0 ] ; } ; then
206
206
# config file exist but it isn't writeable (e.g. Kubernetes v1.9.4+ configMap mount)
207
207
tmp=" /tmp/rabbitmq.conf"
208
208
cat " $newConfigFile " > " ${tmp} "
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ oldConfigFile="$configBase.config"
202
202
newConfigFile=" $configBase .conf"
203
203
204
204
shouldWriteConfig=" $haveConfig "
205
- if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && [ ! -w " $newConfigFile " ]; then
205
+ if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && { [ ! -w " $newConfigFile " ] || [ " $( grep -sq " $newConfigFile " /proc/mounts ; echo $? ) " -eq 0 ] ; } ; then
206
206
# config file exist but it isn't writeable (e.g. Kubernetes v1.9.4+ configMap mount)
207
207
tmp=" /tmp/rabbitmq.conf"
208
208
cat " $newConfigFile " > " ${tmp} "
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ oldConfigFile="$configBase.config"
202
202
newConfigFile=" $configBase .conf"
203
203
204
204
shouldWriteConfig=" $haveConfig "
205
- if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && [ ! -w " $newConfigFile " ]; then
205
+ if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && { [ ! -w " $newConfigFile " ] || [ " $( grep -sq " $newConfigFile " /proc/mounts ; echo $? ) " -eq 0 ] ; } ; then
206
206
# config file exist but it isn't writeable (e.g. Kubernetes v1.9.4+ configMap mount)
207
207
tmp=" /tmp/rabbitmq.conf"
208
208
cat " $newConfigFile " > " ${tmp} "
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ oldConfigFile="$configBase.config"
202
202
newConfigFile=" $configBase .conf"
203
203
204
204
shouldWriteConfig=" $haveConfig "
205
- if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && [ ! -w " $newConfigFile " ]; then
205
+ if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && { [ ! -w " $newConfigFile " ] || [ " $( grep -sq " $newConfigFile " /proc/mounts ; echo $? ) " -eq 0 ] ; } ; then
206
206
# config file exist but it isn't writeable (e.g. Kubernetes v1.9.4+ configMap mount)
207
207
tmp=" /tmp/rabbitmq.conf"
208
208
cat " $newConfigFile " > " ${tmp} "
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ oldConfigFile="$configBase.config"
202
202
newConfigFile=" $configBase .conf"
203
203
204
204
shouldWriteConfig=" $haveConfig "
205
- if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && [ ! -w " $newConfigFile " ]; then
205
+ if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && { [ ! -w " $newConfigFile " ] || [ " $( grep -sq " $newConfigFile " /proc/mounts ; echo $? ) " -eq 0 ] ; } ; then
206
206
# config file exist but it isn't writeable (e.g. Kubernetes v1.9.4+ configMap mount)
207
207
tmp=" /tmp/rabbitmq.conf"
208
208
cat " $newConfigFile " > " ${tmp} "
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ oldConfigFile="$configBase.config"
202
202
newConfigFile=" $configBase .conf"
203
203
204
204
shouldWriteConfig=" $haveConfig "
205
- if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && [ ! -w " $newConfigFile " ]; then
205
+ if [ -n " $shouldWriteConfig " ] && [ -f " $newConfigFile " ] && { [ ! -w " $newConfigFile " ] || [ " $( grep -sq " $newConfigFile " /proc/mounts ; echo $? ) " -eq 0 ] ; } ; then
206
206
# config file exist but it isn't writeable (e.g. Kubernetes v1.9.4+ configMap mount)
207
207
tmp=" /tmp/rabbitmq.conf"
208
208
cat " $newConfigFile " > " ${tmp} "
You can’t perform that action at this time.
0 commit comments