Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 794697
Collapse All | Expand All

(-)/var/db/repos/gentoo/dev-db/mysql-init-scripts/files/init.d-2.3 (-1 / +2 lines)
Lines 80-89 Link Here
80
	local chroot=$(get_config "${MY_CNF}" chroot | tail -n1)
80
	local chroot=$(get_config "${MY_CNF}" chroot | tail -n1)
81
	local wsrep="$(get_config "${MY_CNF}" 'wsrep[_-]on' | tail -n1 | awk '{print tolower($0)}')"
81
	local wsrep="$(get_config "${MY_CNF}" 'wsrep[_-]on' | tail -n1 | awk '{print tolower($0)}')"
82
	local wsrep_new=$(get_config "${MY_CNF}" 'wsrep-new-cluster' | tail -n1)
82
	local wsrep_new=$(get_config "${MY_CNF}" 'wsrep-new-cluster' | tail -n1)
83
	local datadir=$(get_config "${MY_CNF}" datadir | tail -n1)
83
84
84
	if [ -n "${chroot}" ] ; then
85
	if [ -n "${chroot}" ] ; then
85
		socket="${chroot}/${socket}"
86
		socket="${chroot}/${socket}"
86
		pidfile="${chroot}/${pidfile}"
87
		pidfile="${chroot}/${pidfile}"
88
		datadir="${chroot}/${datadir}"
87
	fi
89
	fi
88
90
89
	# Galera: Only check datadir if not starting a new cluster and galera is enabled
91
	# Galera: Only check datadir if not starting a new cluster and galera is enabled
Lines 91-97 Link Here
91
	[ "${wsrep}" = "1" ] && wsrep="on"
93
	[ "${wsrep}" = "1" ] && wsrep="on"
92
	if [ "${wsrep}" != "on" ] || [ -n "${wsrep_new}" ] || stringContain 'wsrep-new-cluster' "${MY_ARGS}" ; then
94
	if [ "${wsrep}" != "on" ] || [ -n "${wsrep_new}" ] || stringContain 'wsrep-new-cluster' "${MY_ARGS}" ; then
93
95
94
		local datadir=$(get_config "${MY_CNF}" datadir | tail -n1)
95
		if [ ! -d "${datadir}" ] ; then
96
		if [ ! -d "${datadir}" ] ; then
96
			eerror "MySQL datadir \`${datadir}' is empty or invalid"
97
			eerror "MySQL datadir \`${datadir}' is empty or invalid"
97
			eerror "Please check your config file \`${MY_CNF}'"
98
			eerror "Please check your config file \`${MY_CNF}'"

Return to bug 794697