Merge branch 'master' into dist/eole/2.6.2/master
This commit is contained in:
commit
5e98dafab2
|
@ -1,5 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# Initialize root password
|
# Initialize root password
|
||||||
# and secure MariaDB installation
|
# and secure MariaDB installation
|
||||||
|
@ -11,22 +10,20 @@ function genPasswordToFile()
|
||||||
pwgen -1 10 > ${file}
|
pwgen -1 10 > ${file}
|
||||||
chmod 600 ${file}
|
chmod 600 ${file}
|
||||||
}
|
}
|
||||||
|
|
||||||
ROLE=$(CreoleGet dbClusterPosition)
|
ROLE=$(CreoleGet dbClusterPosition)
|
||||||
WRITERFILE="/root/.bddadm"
|
WRITERFILE="/root/.bddadm"
|
||||||
SECURE_CMD="mysql_secure_installation"
|
SECURE_CMD="mysql_secure_installation"
|
||||||
|
oldPass=""
|
||||||
|
|
||||||
[[ ${ROLE} == "Node" ]] && exit 0
|
#[[ ${ROLE} == "Node" ]] && exit 0
|
||||||
[[ -e ${WRITERFILE} ]] && exit 0
|
[[ -e ${WRITERFILE} ]] && oldPass=$(< ${WRITERFILE})
|
||||||
|
|
||||||
|
|
||||||
genPasswordToFile ${WRITERFILE}
|
genPasswordToFile ${WRITERFILE}
|
||||||
|
|
||||||
pass=$(< ${WRITERFILE})
|
pass=$(< ${WRITERFILE})
|
||||||
|
|
||||||
# Run secure installation script
|
# Run secure installation script
|
||||||
${SECURE_CMD} <<__EOF__
|
${SECURE_CMD} <<__EOF__
|
||||||
|
${oldPass}
|
||||||
y
|
y
|
||||||
${pass}
|
${pass}
|
||||||
${pass}
|
${pass}
|
||||||
|
|
Loading…
Reference in New Issue