diff options
Diffstat (limited to 'abs/core-testing/LinHES-config-svn')
| -rwxr-xr-x | abs/core-testing/LinHES-config-svn/install_db_chroot.sh | 14 | 
1 files changed, 12 insertions, 2 deletions
diff --git a/abs/core-testing/LinHES-config-svn/install_db_chroot.sh b/abs/core-testing/LinHES-config-svn/install_db_chroot.sh index f187ba8..6dcbfd5 100755 --- a/abs/core-testing/LinHES-config-svn/install_db_chroot.sh +++ b/abs/core-testing/LinHES-config-svn/install_db_chroot.sh @@ -11,11 +11,19 @@ echo "install_db_chroot hostname is $hostname"  . $MV_ROOT/bin/install_functions.sh  #myhost=`cat /etc/hostname` +# Before this script is called, the mysqld that facilitated the installation is killed. +# We need to make sure to stop and start the mysqld that will be used post-install so +# that the database can be initialized. + +/etc/rc.d/mysqld stop +/etc/rc.d/mysqld stop +/etc/rc.d/mysqld start +  # Put a limit on how many times we try to (re-)start MySQL  success_test() {      # parameter: number of tries to start mysqld so far      PID=`pidof -o %PPID /usr/sbin/mysqld` -    if [ -z "$PID" ]; then +    if [ -z "$PID" ]; then # mysqld isn't running  	if [ $1 -gt 3 ]; then  	    echo "ERROR: Failed to start MySQL server in $1 attempts."  	    sleep 5 @@ -24,9 +32,11 @@ success_test() {  	    echo "Tried $1 time(s) to start MySQL server."   	    return 1  	fi -    else +    else # mysqld is running  	return 0      fi +    # should never get here +    return 1  }  mysqld_tries=0  | 
