You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-11-03 17:13:17 +03:00 
			
		
		
		
	fix rc.local amazon issue
This commit is contained in:
		@@ -184,9 +184,9 @@ $installdir/bin/clearShm  > /dev/null 2>&1
 | 
				
			|||||||
systemctl=`which systemctl 2>/dev/null`
 | 
					systemctl=`which systemctl 2>/dev/null`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#check and create rc.local file if missing
 | 
					#check and create rc.local file if missing
 | 
				
			||||||
if [ ! -f /etc/rc.local ]; then
 | 
					if [ ! -f /etc/rc.d/rc.local ]; then
 | 
				
			||||||
	printf '%s\n' '#!/bin/bash' "#" | $SUDO tee -a /etc/rc.local > /dev/null 2>&1
 | 
						printf '%s\n' '#!/bin/bash' "#" | $SUDO tee -a /etc/rc.local > /dev/null 2>&1
 | 
				
			||||||
    	$SUDO chmod +x /etc/rc.local
 | 
					    	$SUDO chmod +x /etc/rc.d/rc.local
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    if [ -n "$systemctl" ]; then
 | 
					    if [ -n "$systemctl" ]; then
 | 
				
			||||||
	systemctl restart rc-local >/dev/null 2>&1
 | 
						systemctl restart rc-local >/dev/null 2>&1
 | 
				
			||||||
@@ -248,7 +248,7 @@ else
 | 
				
			|||||||
	$SUDO chmod 777 /var/lock/subsys > /dev/null 2>&1
 | 
						$SUDO chmod 777 /var/lock/subsys > /dev/null 2>&1
 | 
				
			||||||
	$SUDO rm -f /var/lock/subsys/mysql-Columnstore
 | 
						$SUDO rm -f /var/lock/subsys/mysql-Columnstore
 | 
				
			||||||
	$SUDO chmod 666 /etc/fstab
 | 
						$SUDO chmod 666 /etc/fstab
 | 
				
			||||||
	$SUDO chmod 777 /etc/rc.local
 | 
						$SUDO chmod 777 /etc/rc.d/rc.local
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# install Columnstore Log Rotate File
 | 
					# install Columnstore Log Rotate File
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
* List of files being updated by post-install configure:
 | 
					* List of files being updated by post-install configure:
 | 
				
			||||||
*		mariadb/columnstore/etc/Columnstore.xml
 | 
					*		mariadb/columnstore/etc/Columnstore.xml
 | 
				
			||||||
*		mariadb/columnstore/etc/ProcessConfig.xml
 | 
					*		mariadb/columnstore/etc/ProcessConfig.xml
 | 
				
			||||||
*		/etc/rc.local
 | 
					*		/etc/rc.d/rc.local
 | 
				
			||||||
*		
 | 
					*		
 | 
				
			||||||
******************************************************************************************/
 | 
					******************************************************************************************/
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
@@ -605,6 +605,13 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
		nonDistribute = true;
 | 
							nonDistribute = true;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
 | 
						// setup to start on reboot, for non-root amazon installs
 | 
				
			||||||
 | 
						if ( !rootUser )
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						    system("sudo sed -i -e 's/#sudo runuser/sudo runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1");
 | 
				
			||||||
 | 
						    system("sudo chmod 777 /etc/rc.d/rc.local >/dev/null 2>&1");
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
	cout << endl;
 | 
						cout << endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	cout << "===== Setup System Server Type Configuration =====" << endl << endl;
 | 
						cout << "===== Setup System Server Type Configuration =====" << endl << endl;
 | 
				
			||||||
@@ -1058,10 +1065,6 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
			cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl; 
 | 
								cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl; 
 | 
				
			||||||
			exit(1);
 | 
								exit(1);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
					 | 
				
			||||||
		// setup to start on reboot
 | 
					 | 
				
			||||||
		system("sudo sed -i -e 's/#sudo runuser/sudo runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1");
 | 
					 | 
				
			||||||
		system("sudo chmod 777 /etc/rc.d/rc.local >/dev/null 2>&1");
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	if ( pmwithum )
 | 
						if ( pmwithum )
 | 
				
			||||||
@@ -4010,9 +4013,9 @@ bool makeRClocal(string moduleType, string moduleName, int IserverTypeInstall)
 | 
				
			|||||||
	close(fd);
 | 
						close(fd);
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	if (rootUser)
 | 
						if (rootUser)
 | 
				
			||||||
	    system("cat /tmp/rc.local >> /etc/rc.local > /dev/null");
 | 
						    system("cat /tmp/rc.local >> /etc/rc.d/rc.local > /dev/null");
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
	    system("sudo cat /tmp/rc.local >> /etc/rc.local > /dev/null");
 | 
						    system("sudo cat /tmp/rc.local >> /etc/rc.d/rc.local > /dev/null");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	unlink(fileName.c_str());
 | 
						unlink(fileName.c_str());
 | 
				
			||||||
	  
 | 
						  
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user