1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-10-31 18:30:33 +03:00

fix rc.local amazon issue

This commit is contained in:
david hill
2017-10-25 10:16:08 -05:00
parent a6178b6adf
commit ca1f85cd05
2 changed files with 13 additions and 10 deletions

View File

@@ -184,9 +184,9 @@ $installdir/bin/clearShm > /dev/null 2>&1
systemctl=`which systemctl 2>/dev/null`
#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
$SUDO chmod +x /etc/rc.local
$SUDO chmod +x /etc/rc.d/rc.local
if [ -n "$systemctl" ]; then
systemctl restart rc-local >/dev/null 2>&1
@@ -248,7 +248,7 @@ else
$SUDO chmod 777 /var/lock/subsys > /dev/null 2>&1
$SUDO rm -f /var/lock/subsys/mysql-Columnstore
$SUDO chmod 666 /etc/fstab
$SUDO chmod 777 /etc/rc.local
$SUDO chmod 777 /etc/rc.d/rc.local
fi
# install Columnstore Log Rotate File

View File

@@ -23,7 +23,7 @@
* List of files being updated by post-install configure:
* mariadb/columnstore/etc/Columnstore.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;
}
// 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 << "===== 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;
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 )
@@ -4010,9 +4013,9 @@ bool makeRClocal(string moduleType, string moduleName, int IserverTypeInstall)
close(fd);
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
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());