You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
MCOL-520 - remove sudo command
This commit is contained in:
@@ -316,10 +316,8 @@ kill_by_pid() {
|
|||||||
|
|
||||||
if [ -n "$pid" ]; then
|
if [ -n "$pid" ]; then
|
||||||
ppid=$(ps -o ppid= -p $pid)
|
ppid=$(ps -o ppid= -p $pid)
|
||||||
$SUDO kill -9 $ppid
|
|
||||||
kill -9 $ppid
|
kill -9 $ppid
|
||||||
sleep 1
|
sleep 1
|
||||||
$SUDO kill -9 $pid
|
|
||||||
kill -9 $pid
|
kill -9 $pid
|
||||||
echo $echo_n "Force shutting down (no/bad pid file)"
|
echo $echo_n "Force shutting down (no/bad pid file)"
|
||||||
log_success_msg
|
log_success_msg
|
||||||
|
@@ -601,9 +601,6 @@ int main(int argc, char* argv[])
|
|||||||
string port = cf->getConfig(DMLProc, "Port");
|
string port = cf->getConfig(DMLProc, "Port");
|
||||||
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
||||||
|
|
||||||
if ( !rootUser)
|
|
||||||
cmd = "sudo fuser -k " + port + "/tcp >/dev/null 2>&1";
|
|
||||||
|
|
||||||
(void)::system(cmd.c_str());
|
(void)::system(cmd.c_str());
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
|
@@ -57,17 +57,13 @@ if [ "x$has_um" = x ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
user=`whoami 2>/dev/null`
|
user=`whoami 2>/dev/null`
|
||||||
SUDO=" "
|
|
||||||
if [ $user != "root" ]; then
|
|
||||||
SUDO="sudo "
|
|
||||||
fi
|
|
||||||
|
|
||||||
checkInstallSetup() {
|
checkInstallSetup() {
|
||||||
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Columnstore.xml Installation InitialInstallFlag`
|
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Columnstore.xml Installation InitialInstallFlag`
|
||||||
if [ $InitialInstallFlag != "y" ]; then
|
if [ $InitialInstallFlag != "y" ]; then
|
||||||
echo "Please run the postConfigure install script, check the Installation Guide"
|
echo "Please run the postConfigure install script, check the Installation Guide"
|
||||||
echo "for additional details"
|
echo "for additional details"
|
||||||
$SUDO rm -f /var/lock/subsys/columnstore
|
rm -f /var/lock/subsys/columnstore
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -80,13 +76,13 @@ start() {
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
($SUDO mkdir -p /var/lock/subsys && $SUDO chmod 777 /var/lock/subsys && $SUDO touch /var/lock/subsys/columnstore) >/dev/null 2>&1
|
(mkdir -p /var/lock/subsys && chmod 777 /var/lock/subsys && touch /var/lock/subsys/columnstore) >/dev/null 2>&1
|
||||||
|
|
||||||
if [ -x $InstallDir/bin/columnstore.pre-start ]; then
|
if [ -x $InstallDir/bin/columnstore.pre-start ]; then
|
||||||
$InstallDir/bin/columnstore.pre-start
|
$InstallDir/bin/columnstore.pre-start
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Error running MariaDB Columnstore pre-start script, not starting MariaDB Columnstore"
|
echo "Error running MariaDB Columnstore pre-start script, not starting MariaDB Columnstore"
|
||||||
$SUDO rm -f /var/lock/subsys/columnstore
|
rm -f /var/lock/subsys/columnstore
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -94,34 +90,29 @@ start() {
|
|||||||
|
|
||||||
CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Columnstore.xml Installation CoreFileFlag`
|
CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Columnstore.xml Installation CoreFileFlag`
|
||||||
if [ $CoreFileFlag = "y" ]; then
|
if [ $CoreFileFlag = "y" ]; then
|
||||||
SUDO=
|
|
||||||
if [ "$user" != "root" ]; then
|
|
||||||
SUDO="$SUDO"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#columnstore core files
|
#columnstore core files
|
||||||
$SUDO ulimit -c unlimited > /dev/null 2>&1
|
ulimit -c unlimited > /dev/null 2>&1
|
||||||
$SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1
|
sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1
|
||||||
$SUDO sysctl -q -w kernel.core_pattern=/var/log/mariadb/columnstore/corefiles/core.%e.%p > /dev/null 2>&1
|
sysctl -q -w kernel.core_pattern=/var/log/mariadb/columnstore/corefiles/core.%e.%p > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
echo "Starting MariaDB Columnstore Database Platform"
|
echo "Starting MariaDB Columnstore Database Platform"
|
||||||
$SUDO rm -f /tmp/StopColumnstore
|
rm -f /tmp/StopColumnstore
|
||||||
exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 &
|
exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 &
|
||||||
|
|
||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
stop() {
|
stop() {
|
||||||
echo "Shutting down MariaDB Columnstore Database Platform"
|
echo "Shutting down MariaDB Columnstore Database Platform"
|
||||||
$SUDO touch /tmp/StopColumnstore
|
touch /tmp/StopColumnstore
|
||||||
$SUDO pkill ProcMon
|
pkill ProcMon
|
||||||
$SUDO pkill ProcMgr
|
pkill ProcMgr
|
||||||
sleep 1
|
sleep 1
|
||||||
$InstallDir/bin/clearShm
|
$InstallDir/bin/clearShm
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
$SUDO rm -f /var/lock/subsys/columnstore
|
rm -f /var/lock/subsys/columnstore
|
||||||
$SUDO fuser -k 8604/tcp > /dev/null 2>&1
|
fuser -k 8604/tcp > /dev/null 2>&1
|
||||||
test -f $InstallDir/mysql/mysql-Columnstore || return $RETVAL
|
test -f $InstallDir/mysql/mysql-Columnstore || return $RETVAL
|
||||||
$InstallDir/mysql/mysql-Columnstore stop > /dev/null 2>&1
|
$InstallDir/mysql/mysql-Columnstore stop > /dev/null 2>&1
|
||||||
if [ -x $InstallDir/bin/columnstore.post-stop ]; then
|
if [ -x $InstallDir/bin/columnstore.post-stop ]; then
|
||||||
|
@@ -63,17 +63,10 @@ if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
|||||||
if [ $module = "pm" ]; then
|
if [ $module = "pm" ]; then
|
||||||
if test -f $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab ; then
|
if test -f $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab ; then
|
||||||
echo "Setup fstab on Module"
|
echo "Setup fstab on Module"
|
||||||
if [ $user = "root" ]; then
|
|
||||||
touch /etc/fstab
|
touch /etc/fstab
|
||||||
rm -f /etc/fstab.columnstoreSave
|
rm -f /etc/fstab.columnstoreSave
|
||||||
cp /etc/fstab /etc/fstab.columnstoreSave
|
cp /etc/fstab /etc/fstab.columnstoreSave
|
||||||
cat $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab
|
cat $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab
|
||||||
else
|
|
||||||
sudo touch /etc/fstab
|
|
||||||
sudo chmod 666 /etc/fstab
|
|
||||||
sudo rm -f /etc/fstab.columnstoreSave
|
|
||||||
sudo cp /etc/fstab /etc/fstab.columnstoreSave
|
|
||||||
sudo cat $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -93,12 +86,8 @@ if [ $module = "um" ]; then
|
|||||||
echo "Setup UM Volume Mount"
|
echo "Setup UM Volume Mount"
|
||||||
device=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMVolumeDeviceName$mid`
|
device=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMVolumeDeviceName$mid`
|
||||||
mkdir -p $COLUMNSTORE_INSTALL_DIR/mysql/db > /dev/null 2>&1
|
mkdir -p $COLUMNSTORE_INSTALL_DIR/mysql/db > /dev/null 2>&1
|
||||||
if [ $user = "root" ]; then
|
|
||||||
mount $device $COLUMNSTORE_INSTALL_DIR/mysql/db -t ext2 -o noatime,nodiratime,noauto
|
mount $device $COLUMNSTORE_INSTALL_DIR/mysql/db -t ext2 -o noatime,nodiratime,noauto
|
||||||
chown mysql:mysql -R $COLUMNSTORE_INSTALL_DIR/mysql > /dev/null 2>&1
|
chown mysql:mysql -R $COLUMNSTORE_INSTALL_DIR/mysql > /dev/null 2>&1
|
||||||
else
|
|
||||||
sudo mount $device $COLUMNSTORE_INSTALL_DIR/mysql/db -t ext2 -o noatime,nodiratime,noauto,user
|
|
||||||
sudo chown $user:$user -R $COLUMNSTORE_INSTALL_DIR/mysql > /dev/null 2>&1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -181,18 +170,10 @@ touch $RCFILE
|
|||||||
|
|
||||||
echo "add deadline to rc.local"
|
echo "add deadline to rc.local"
|
||||||
if [ $module = "um" ]; then
|
if [ $module = "um" ]; then
|
||||||
if [ $user = "root" ]; then
|
|
||||||
echo "for scsi_dev in \`mount | awk '/mnt\\/tmp/ {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'\`; do" >> $RCFILE
|
echo "for scsi_dev in \`mount | awk '/mnt\\/tmp/ {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'\`; do" >> $RCFILE
|
||||||
echo "echo deadline > /sys/block/$scsi_dev/queue/scheduler" >> $RCFILE
|
echo "echo deadline > /sys/block/$scsi_dev/queue/scheduler" >> $RCFILE
|
||||||
echo "done" >> $RCFILE
|
echo "done" >> $RCFILE
|
||||||
else
|
|
||||||
sudo chmod 666 $RCFILE
|
|
||||||
sudo echo "for scsi_dev in \`mount | awk '/mnt\\/tmp/ {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'\`; do" >> $RCFILE
|
|
||||||
sudo echo "echo deadline > /sys/block/$scsi_dev/queue/scheduler" >> $RCFILE
|
|
||||||
sudo echo "done" >> $RCFILE
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
if [ $user = "root" ]; then
|
|
||||||
echo "for scsi_dev in \`mount | awk '/mnt\\/tmp/ {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'\`; do" >> $RCFILE
|
echo "for scsi_dev in \`mount | awk '/mnt\\/tmp/ {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'\`; do" >> $RCFILE
|
||||||
echo "echo deadline > /sys/block/$scsi_dev/queue/scheduler" >> $RCFILE
|
echo "echo deadline > /sys/block/$scsi_dev/queue/scheduler" >> $RCFILE
|
||||||
echo "done" >> $RCFILE
|
echo "done" >> $RCFILE
|
||||||
@@ -200,21 +181,11 @@ else
|
|||||||
echo "for scsi_dev in \`mount | awk '/columnstore\\/data/ {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'\`; do" >> $RCFILE
|
echo "for scsi_dev in \`mount | awk '/columnstore\\/data/ {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'\`; do" >> $RCFILE
|
||||||
echo "echo deadline > /sys/block/$scsi_dev/queue/scheduler" >> $RCFILE
|
echo "echo deadline > /sys/block/$scsi_dev/queue/scheduler" >> $RCFILE
|
||||||
echo "done" >> $RCFILE
|
echo "done" >> $RCFILE
|
||||||
else
|
|
||||||
sudo chmod 666 $RCFILE
|
|
||||||
sudo echo "for scsi_dev in \`mount | awk '/mnt\\/tmp/ {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'\`; do" >> $RCFILE
|
|
||||||
sudo echo "echo deadline > /sys/block/$scsi_dev/queue/scheduler" >> $RCFILE
|
|
||||||
sudo echo "done" >> $RCFILE
|
|
||||||
|
|
||||||
sudo echo "for scsi_dev in \`mount | awk '/columnstore\\/data/ {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'\`; do" >> $RCFILE
|
|
||||||
sudo echo "echo deadline > /sys/block/$scsi_dev/queue/scheduler" >> $RCFILE
|
|
||||||
sudo echo "done" >> $RCFILE
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $user != "root" ]; then
|
if [ $user != "root" ]; then
|
||||||
echo "uncomment runuser in rc.local"
|
echo "uncomment runuser in rc.local"
|
||||||
sudo sed -i -e 's/#sudo runuser/sudo runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1
|
sed -i -e 's/#sudo runuser/sudo runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "!!!Module Installation Successfully Completed!!!"
|
echo "!!!Module Installation Successfully Completed!!!"
|
||||||
|
@@ -8,10 +8,6 @@ prefix=/usr/local
|
|||||||
installdir=$prefix/mariadb/columnstore
|
installdir=$prefix/mariadb/columnstore
|
||||||
rpmmode=install
|
rpmmode=install
|
||||||
user=`whoami 2>/dev/null`
|
user=`whoami 2>/dev/null`
|
||||||
SUDO=" "
|
|
||||||
if [ $user != "root" ]; then
|
|
||||||
SUDO="sudo "
|
|
||||||
fi
|
|
||||||
|
|
||||||
quiet=0
|
quiet=0
|
||||||
|
|
||||||
@@ -93,7 +89,7 @@ if [ -f libstdc++.so.6.0.14 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# softlink for libperl.sp, used by cplogger
|
# softlink for libperl.sp, used by cplogger
|
||||||
$SUDO ln -s /usr/lib64/perl5/CORE/libperl.so /usr/lib64/libperl.so >/dev/null 2>&1
|
ln -s /usr/lib64/perl5/CORE/libperl.so /usr/lib64/libperl.so >/dev/null 2>&1
|
||||||
|
|
||||||
#setup profile files
|
#setup profile files
|
||||||
profileFileAlias=/etc/profile.d/columnstoreAlias.sh
|
profileFileAlias=/etc/profile.d/columnstoreAlias.sh
|
||||||
@@ -104,36 +100,36 @@ if [ $installdir != "/usr/local/mariadb/columnstore" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $user != "root" ]; then
|
if [ $user != "root" ]; then
|
||||||
sudo rm -f $profileFileEnv
|
rm -f $profileFileEnv
|
||||||
sudo rm -f $profileFileAlias
|
rm -f $profileFileAlias
|
||||||
|
|
||||||
sudo touch $profileFileEnv
|
touch $profileFileEnv
|
||||||
sudo chmod 666 $profileFileEnv
|
chmod 666 $profileFileEnv
|
||||||
egrep -qs 'MariaDB Columnstore Non-Root' ${profileFileEnv}
|
egrep -qs 'MariaDB Columnstore Non-Root' ${profileFileEnv}
|
||||||
rc1=$?
|
rc1=$?
|
||||||
if [ $rc1 -ne 0 ]; then
|
if [ $rc1 -ne 0 ]; then
|
||||||
sudo echo " " >> ${profileFileEnv}
|
echo " " >> ${profileFileEnv}
|
||||||
sudo echo "# MariaDB Columnstore Non-Root Environment Variables" >> ${profileFileEnv}
|
echo "# MariaDB Columnstore Non-Root Environment Variables" >> ${profileFileEnv}
|
||||||
sudo echo "export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR" >> ${profileFileEnv}
|
echo "export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR" >> ${profileFileEnv}
|
||||||
sudo echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib:$COLUMNSTORE_INSTALL_DIR/mysql/lib" >> ${profileFileEnv}
|
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib:$COLUMNSTORE_INSTALL_DIR/mysql/lib" >> ${profileFileEnv}
|
||||||
. ${profileFileEnv}
|
. ${profileFileEnv}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo /bin/cp -f $installdir/bin/columnstoreAlias $profileFileAlias
|
/bin/cp -f $installdir/bin/columnstoreAlias $profileFileAlias
|
||||||
sudo chmod 666 $profileFileAlias
|
chmod 666 $profileFileAlias
|
||||||
else
|
else
|
||||||
/bin/cp -f $installdir/bin/columnstoreAlias $profileFileAlias
|
/bin/cp -f $installdir/bin/columnstoreAlias $profileFileAlias
|
||||||
chmod 644 $profileFileAlias
|
644 $profileFileAlias
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /
|
cd /
|
||||||
|
|
||||||
test -d /var/log/mariadb || $SUDO mkdir /var/log/mariadb >/dev/null 2>&1
|
test -d /var/log/mariadb || mkdir /var/log/mariadb >/dev/null 2>&1
|
||||||
test -d /var/log/mariadb/columnstore || $SUDO mkdir /var/log/mariadb/columnstore >/dev/null 2>&1
|
test -d /var/log/mariadb/columnstore || mkdir /var/log/mariadb/columnstore >/dev/null 2>&1
|
||||||
|
|
||||||
if [ $user != "root" ]; then
|
if [ $user != "root" ]; then
|
||||||
$SUDO chmod -R 777 /var/log/mariadb >/dev/null 2>&1
|
chmod -R 777 /var/log/mariadb >/dev/null 2>&1
|
||||||
$SUDO chown -R $user:$user /var/log/mariadb >/dev/null 2>&1
|
chown -R $user:$user /var/log/mariadb >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test -d /var/log/mariadb/columnstore/archive || mkdir /var/log/mariadb/columnstore/archive >/dev/null 2>&1
|
test -d /var/log/mariadb/columnstore/archive || mkdir /var/log/mariadb/columnstore/archive >/dev/null 2>&1
|
||||||
@@ -190,17 +186,9 @@ if [ $user = "root" ]; then
|
|||||||
touch $RCFILE
|
touch $RCFILE
|
||||||
chmod +x $RCFILE
|
chmod +x $RCFILE
|
||||||
else
|
else
|
||||||
$SUDO touch $RCFILE
|
printf '%s\n' '#!/bin/bash' "#" | tee -a $RCFILE > /dev/null 2>&1
|
||||||
$SUDO chmod 777 $RCFILE
|
|
||||||
$SUDO printf '%s\n' '#!/bin/bash' "#" | $SUDO tee -a $RCFILE > /dev/null 2>&1
|
|
||||||
|
|
||||||
if [ -n "$systemctl" ]; then
|
|
||||||
$SUDO systemctl start rc-local >/dev/null 2>&1
|
|
||||||
$SUDO systemctl enable rc-local >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#setup the columnstore service script
|
#setup the columnstore service script
|
||||||
rm -f /etc/init.d/columnstore >/dev/null 2>&1
|
rm -f /etc/init.d/columnstore >/dev/null 2>&1
|
||||||
rm -f /etc/init.d/mysql-Columnstore >/dev/null 2>&1
|
rm -f /etc/init.d/mysql-Columnstore >/dev/null 2>&1
|
||||||
@@ -236,28 +224,24 @@ fi
|
|||||||
if [ $user = "root" ]; then
|
if [ $user = "root" ]; then
|
||||||
$installdir/bin/syslogSetup.sh install > /tmp/syslog_install.log 2>&1
|
$installdir/bin/syslogSetup.sh install > /tmp/syslog_install.log 2>&1
|
||||||
rm -f /etc/default/columnstore
|
rm -f /etc/default/columnstore
|
||||||
|
|
||||||
|
#check if MariaDB Columnstore system logging was setup
|
||||||
|
cat /tmp/syslog_install.log | grep 'No System Logging' >/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
cat /tmp/syslog_install.log
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g $installdir/bin/columnstore.def
|
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g $installdir/bin/columnstore.def
|
||||||
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g $installdir/bin/columnstoreLogRotate
|
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g $installdir/bin/columnstoreLogRotate
|
||||||
|
|
||||||
$SUDO cp $installdir/bin/columnstore.def /etc/default/columnstore
|
cp $installdir/bin/columnstore.def /etc/default/columnstore
|
||||||
|
|
||||||
sed -i -e s@prefix=/home/guest@prefix=$prefix@g $installdir/bin/*
|
sed -i -e s@prefix=/home/guest@prefix=$prefix@g $installdir/bin/*
|
||||||
|
|
||||||
$SUDO chmod 777 /tmp
|
chown $user:$user $installdir/etc/Columnstore.xml
|
||||||
$installdir/bin/syslogSetup.sh --installdir=$installdir install > /tmp/syslog_install.log 2>&1
|
mkdir /var/lock/subsys > /dev/null 2>&1
|
||||||
$SUDO chown $user:$user $installdir/etc/Columnstore.xml
|
chmod 777 /var/lock/subsys > /dev/null 2>&1
|
||||||
$SUDO chmod -R 777 /dev/shm
|
rm -f /var/lock/subsys/mysql-Columnstore
|
||||||
$SUDO mkdir /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 chmod 666 /etc/fstab
|
|
||||||
fi
|
|
||||||
|
|
||||||
#check if MariaDB Columnstore system logging was setup
|
|
||||||
cat /tmp/syslog_install.log | grep 'No System Logging' >/dev/null 2>&1
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
cat /tmp/syslog_install.log
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#backup copy of Alarm Config File
|
#backup copy of Alarm Config File
|
||||||
|
@@ -62,7 +62,7 @@ done
|
|||||||
|
|
||||||
USER=`whoami 2>/dev/null`
|
USER=`whoami 2>/dev/null`
|
||||||
if [ $USER != "root" ]; then
|
if [ $USER != "root" ]; then
|
||||||
sudo ldconfig >/dev/null 2>&1
|
ldconfig >/dev/null 2>&1
|
||||||
export COLUMNSTORE_INSTALL_DIR=$installdir
|
export COLUMNSTORE_INSTALL_DIR=$installdir
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib:$COLUMNSTORE_INSTALL_DIR/mysql/lib
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib:$COLUMNSTORE_INSTALL_DIR/mysql/lib
|
||||||
else
|
else
|
||||||
|
@@ -8,10 +8,6 @@ prefix=/usr/local
|
|||||||
installdir=$prefix/mariadb/columnstore
|
installdir=$prefix/mariadb/columnstore
|
||||||
rpmmode=install
|
rpmmode=install
|
||||||
user=`whoami 2>/dev/null`
|
user=`whoami 2>/dev/null`
|
||||||
SUDO=" "
|
|
||||||
if [ $user != "root" ]; then
|
|
||||||
SUDO="sudo "
|
|
||||||
fi
|
|
||||||
|
|
||||||
quiet=0
|
quiet=0
|
||||||
|
|
||||||
@@ -39,9 +35,9 @@ $installdir/myql/columnstore-Mysql stop > /dev/null 2>&1
|
|||||||
|
|
||||||
# uninstall OS scripts updated by postConfigure
|
# uninstall OS scripts updated by postConfigure
|
||||||
if test -f /etc/exports.columnstoreSave ; then
|
if test -f /etc/exports.columnstoreSave ; then
|
||||||
$SUDO mv -f /etc/exports.columnstoreSave /etc/exports > /dev/null 2>&1
|
mv -f /etc/exports.columnstoreSave /etc/exports > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
$SUDO rm -f /etc/exports > /dev/null 2>&1
|
rm -f /etc/exports > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export COLUMNSTORE_INSTALL_DIR=$installdir
|
export COLUMNSTORE_INSTALL_DIR=$installdir
|
||||||
@@ -49,30 +45,30 @@ export COLUMNSTORE_INSTALL_DIR=$installdir
|
|||||||
cloud=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation Cloud`
|
cloud=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation Cloud`
|
||||||
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
||||||
if test -f /etc/fstab ; then
|
if test -f /etc/fstab ; then
|
||||||
$SUDO sed -i '/Columnstore\/data/d' /etc/fstab > /dev/null 2>&1
|
sed -i '/Columnstore\/data/d' /etc/fstab > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#remove log file directories
|
#remove log file directories
|
||||||
#rm -rf /var/log/mariadb/columnstore > /dev/null 2>&1
|
#rm -rf /var/log/mariadb/columnstore > /dev/null 2>&1
|
||||||
#rm -f $installdir/mysql/db/*.err > /dev/null 2>&1
|
#rm -f $installdir/mysql/db/*.err > /dev/null 2>&1
|
||||||
$SUDO rm -f /var/log/mariadb/columnstore/activeAlarms > /dev/null 2>&1
|
rm -f /var/log/mariadb/columnstore/activeAlarms > /dev/null 2>&1
|
||||||
$SUDO rm -f /var/log/mariadb/columnstore/*.log1 > /dev/null 2>&1
|
rm -f /var/log/mariadb/columnstore/*.log1 > /dev/null 2>&1
|
||||||
rm -rf $installdir/mysql/db/columnstore_log_archive > /dev/null 2>&1
|
rm -rf $installdir/mysql/db/columnstore_log_archive > /dev/null 2>&1
|
||||||
$SUDO rm -f /etc/default/columnstore
|
rm -f /etc/default/columnstore
|
||||||
|
|
||||||
# remove Mariab Columnstore Log Rotate File abd Transaction Log File
|
# remove Mariab Columnstore Log Rotate File abd Transaction Log File
|
||||||
$SUDO rm -f /etc/logrotate.d/columnstore > /dev/null 2>&1
|
rm -f /etc/logrotate.d/columnstore > /dev/null 2>&1
|
||||||
$SUDO rm -f /etc/cron.d/transactionLog > /dev/null 2>&1
|
rm -f /etc/cron.d/transactionLog > /dev/null 2>&1
|
||||||
|
|
||||||
# delete Mariab Columnstore shared memory segments
|
# delete Mariab Columnstore shared memory segments
|
||||||
$installdir/bin/clearShm > /dev/null 2>&1
|
$installdir/bin/clearShm > /dev/null 2>&1
|
||||||
|
|
||||||
# delete prat files
|
# delete prat files
|
||||||
$SUDO rm -f /etc/cron.d/ps > /dev/null 2>&1
|
rm -f /etc/cron.d/ps > /dev/null 2>&1
|
||||||
$SUDO rm -f /etc/pscollect > /dev/null 2>&1
|
rm -f /etc/pscollect > /dev/null 2>&1
|
||||||
$SUDO /etc/init.d/crond reload > /dev/null 2>&1
|
/etc/init.d/crond reload > /dev/null 2>&1
|
||||||
$SUDO systemctl reload crond.service > /dev/null 2>&1
|
systemctl reload crond.service > /dev/null 2>&1
|
||||||
|
|
||||||
# delete tmp files
|
# delete tmp files
|
||||||
rm -f $installdir/local/*.columnstore
|
rm -f $installdir/local/*.columnstore
|
||||||
@@ -81,7 +77,7 @@ rm -rf /tmp/bucketreuse
|
|||||||
rm -f /tmp/columnstore.txt
|
rm -f /tmp/columnstore.txt
|
||||||
rm -f /tmp/dbbuilder.*
|
rm -f /tmp/dbbuilder.*
|
||||||
rm -f /tmp/dbrmfiles
|
rm -f /tmp/dbrmfiles
|
||||||
$SUDO rm -f /var/lock/subsys/columnstore
|
rm -f /var/lock/subsys/columnstore
|
||||||
rm -f /tmp/pkgcheck
|
rm -f /tmp/pkgcheck
|
||||||
rm -f /tmp/upgrade-status.log.*
|
rm -f /tmp/upgrade-status.log.*
|
||||||
rm -f /tmp/mount.log
|
rm -f /tmp/mount.log
|
||||||
@@ -103,9 +99,6 @@ fi
|
|||||||
if [ -x $installdir/bin/syslogSetup.sh ]; then
|
if [ -x $installdir/bin/syslogSetup.sh ]; then
|
||||||
if [ $user = "root" ]; then
|
if [ $user = "root" ]; then
|
||||||
$installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1
|
$installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1
|
||||||
else
|
|
||||||
$SUDO $installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#remove the start service command
|
#remove the start service command
|
||||||
@@ -145,7 +138,7 @@ fi
|
|||||||
if [ $user = "root" ]; then
|
if [ $user = "root" ]; then
|
||||||
rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1
|
rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
$SUDO rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1
|
rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#remove library paths
|
#remove library paths
|
||||||
@@ -153,14 +146,14 @@ if [ $user = "root" ]; then
|
|||||||
rm -f /etc/ld.so.conf.d/columnstore.conf
|
rm -f /etc/ld.so.conf.d/columnstore.conf
|
||||||
ldconfig
|
ldconfig
|
||||||
else
|
else
|
||||||
$SUDO rm -f /etc/defaults/columnstore
|
rm -f /etc/defaults/columnstore
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#cleanup profile file
|
#cleanup profile file
|
||||||
if [ $user = "root" ]; then
|
if [ $user = "root" ]; then
|
||||||
rm -f /etc/profile.d/columnstore*
|
rm -f /etc/profile.d/columnstore*
|
||||||
else
|
else
|
||||||
$SUDO rm -f /etc/profile.d/columnstore*
|
rm -f /etc/profile.d/columnstore*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#tell user to run post configure script
|
#tell user to run post configure script
|
||||||
|
@@ -14,11 +14,6 @@ rsyslog7=0
|
|||||||
|
|
||||||
user=`whoami 2>/dev/null`
|
user=`whoami 2>/dev/null`
|
||||||
|
|
||||||
SUDO=" "
|
|
||||||
if [ "$user" != "root" ]; then
|
|
||||||
SUDO="sudo "
|
|
||||||
fi
|
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
prefix="`echo $arg | awk -F= '{print $2}'`"
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
@@ -69,13 +64,13 @@ if [ "$daemon" = "nodaemon" ]; then
|
|||||||
|
|
||||||
if [ -f /etc/syslog.conf ]; then
|
if [ -f /etc/syslog.conf ]; then
|
||||||
daemon="syslog"
|
daemon="syslog"
|
||||||
$SUDO /etc/init.d/syslog start > /dev/null 2>&1
|
/etc/init.d/syslog start > /dev/null 2>&1
|
||||||
elif [ -f /etc/rsyslog.conf ]; then
|
elif [ -f /etc/rsyslog.conf ]; then
|
||||||
daemon="rsyslog"
|
daemon="rsyslog"
|
||||||
$SUDO /etc/init.d/rsyslog start > /dev/null 2>&1
|
/etc/init.d/rsyslog start > /dev/null 2>&1
|
||||||
elif [ -f /etc/init.d/syslog-ng ]; then
|
elif [ -f /etc/init.d/syslog-ng ]; then
|
||||||
daemon="syslog-ng"
|
daemon="syslog-ng"
|
||||||
$SUDO /etc/init.d/syslog-ng start > /dev/null 2>&1
|
/etc/init.d/syslog-ng start > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -99,7 +94,7 @@ if [ "$daemon" = "syslog-ng" ]; then
|
|||||||
fi
|
fi
|
||||||
elif [ "$daemon" = "rsyslog" ]; then
|
elif [ "$daemon" = "rsyslog" ]; then
|
||||||
#check if rsyslog version 7 or greater
|
#check if rsyslog version 7 or greater
|
||||||
$SUDO rsyslogd -v > /tmp/rsyslog.ver
|
rsyslogd -v > /tmp/rsyslog.ver
|
||||||
cnt=`grep "rsyslogd 7" /tmp/rsyslog.ver | wc -l`
|
cnt=`grep "rsyslogd 7" /tmp/rsyslog.ver | wc -l`
|
||||||
if [ $cnt -gt 0 ]; then
|
if [ $cnt -gt 0 ]; then
|
||||||
rsyslog7=1
|
rsyslog7=1
|
||||||
@@ -156,31 +151,31 @@ checkSyslog
|
|||||||
if [ ! -z "$syslog_conf" ] ; then
|
if [ ! -z "$syslog_conf" ] ; then
|
||||||
$installdir/bin/setConfig -d Installation SystemLogConfigFile ${syslog_conf} >/dev/null 2>&1
|
$installdir/bin/setConfig -d Installation SystemLogConfigFile ${syslog_conf} >/dev/null 2>&1
|
||||||
if [ "$syslog_conf" != /etc/rsyslog.d/columnstore.conf ]; then
|
if [ "$syslog_conf" != /etc/rsyslog.d/columnstore.conf ]; then
|
||||||
$SUDO rm -f ${syslog_conf}.columnstoreSave
|
rm -f ${syslog_conf}.columnstoreSave
|
||||||
$SUDO cp ${syslog_conf} ${syslog_conf}.columnstoreSave >/dev/null 2>&1
|
cp ${syslog_conf} ${syslog_conf}.columnstoreSave >/dev/null 2>&1
|
||||||
$SUDO sed -i '/# MariaDB/,$d' ${syslog_conf}.columnstoreSave > /dev/null 2>&1
|
sed -i '/# MariaDB/,$d' ${syslog_conf}.columnstoreSave > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
egrep -qs 'MariaDB Columnstore Database Platform Logging' ${syslog_conf}
|
egrep -qs 'MariaDB Columnstore Database Platform Logging' ${syslog_conf}
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
#set the syslog for ColumnStore logging
|
#set the syslog for ColumnStore logging
|
||||||
# remove older version incase it was installed by previous build
|
# remove older version incase it was installed by previous build
|
||||||
$SUDO rm -rf /etc/rsyslog.d/columnstore.conf
|
rm -rf /etc/rsyslog.d/columnstore.conf
|
||||||
|
|
||||||
if [ $rsyslog7 == 1 ]; then
|
if [ $rsyslog7 == 1 ]; then
|
||||||
sed -i -e s/groupname/adm/g ${columnstoreSyslogFile7}
|
sed -i -e s/groupname/adm/g ${columnstoreSyslogFile7}
|
||||||
sed -i -e s/username/syslog/g ${columnstoreSyslogFile7}
|
sed -i -e s/username/syslog/g ${columnstoreSyslogFile7}
|
||||||
|
|
||||||
$SUDO rm -f /etc/rsyslog.d/49-columnstore.conf
|
rm -f /etc/rsyslog.d/49-columnstore.conf
|
||||||
$SUDO cp ${columnstoreSyslogFile7} ${syslog_conf}
|
cp ${columnstoreSyslogFile7} ${syslog_conf}
|
||||||
else
|
else
|
||||||
$SUDO cp ${columnstoreSyslogFile} ${syslog_conf}
|
cp ${columnstoreSyslogFile} ${syslog_conf}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install Columnstore Log Rotate File
|
# install Columnstore Log Rotate File
|
||||||
$SUDO cp $installdir/bin/columnstoreLogRotate /etc/logrotate.d/columnstore > /dev/null 2>&1
|
cp $installdir/bin/columnstoreLogRotate /etc/logrotate.d/columnstore > /dev/null 2>&1
|
||||||
$SUDO chmod 644 /etc/logrotate.d/columnstore
|
chmod 644 /etc/logrotate.d/columnstore
|
||||||
|
|
||||||
restartSyslog
|
restartSyslog
|
||||||
fi
|
fi
|
||||||
@@ -196,19 +191,19 @@ if [ ! -z "$syslog_conf" ] ; then
|
|||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
if [ -f ${syslog_conf}.columnstoreSave ] ; then
|
if [ -f ${syslog_conf}.columnstoreSave ] ; then
|
||||||
#uninstall the syslog for ColumnStore logging
|
#uninstall the syslog for ColumnStore logging
|
||||||
$SUDO v -f ${syslog_conf} ${syslog_conf}.ColumnStoreBackup
|
v -f ${syslog_conf} ${syslog_conf}.ColumnStoreBackup
|
||||||
$SUDO mv -f ${syslog_conf}.columnstoreSave ${syslog_conf} >/dev/null 2>&1
|
mv -f ${syslog_conf}.columnstoreSave ${syslog_conf} >/dev/null 2>&1
|
||||||
if [ ! -f ${syslog_conf} ] ; then
|
if [ ! -f ${syslog_conf} ] ; then
|
||||||
$SUDO cp ${syslog_conf}.ColumnStoreBackup ${syslog_conf}
|
cp ${syslog_conf}.ColumnStoreBackup ${syslog_conf}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
$SUDO sed -i '/# MariaDB/,$d' ${syslog_conf} > /dev/null 2>&1
|
sed -i '/# MariaDB/,$d' ${syslog_conf} > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
$SUDO rm -f "$syslog_conf"
|
rm -f "$syslog_conf"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
$SUDO rm -f "$syslog_conf"
|
rm -f "$syslog_conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
restartSyslog
|
restartSyslog
|
||||||
@@ -248,21 +243,21 @@ restartSyslog() {
|
|||||||
|
|
||||||
if [ "$daemon" = "syslog-ng" ]; then
|
if [ "$daemon" = "syslog-ng" ]; then
|
||||||
if [ -f /etc/init.d/syslog-ng ]; then
|
if [ -f /etc/init.d/syslog-ng ]; then
|
||||||
$SUDO /etc/init.d/syslog-ng restart > /dev/null 2>&1
|
/etc/init.d/syslog-ng restart > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
$SUDO systemctl restart syslog-ng.service > /dev/null 2>&1
|
systemctl restart syslog-ng.service > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
elif [ "$daemon" = "rsyslog" ]; then
|
elif [ "$daemon" = "rsyslog" ]; then
|
||||||
if [ -f /etc/init.d/rsyslog ]; then
|
if [ -f /etc/init.d/rsyslog ]; then
|
||||||
$SUDO /etc/init.d/rsyslog restart > /dev/null 2>&1
|
/etc/init.d/rsyslog restart > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
$SUDO systemctl restart rsyslog.service > /dev/null 2>&1
|
systemctl restart rsyslog.service > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
elif [ "$daemon" = "syslog" ]; then
|
elif [ "$daemon" = "syslog" ]; then
|
||||||
if [ -f /etc/init.d/syslog ]; then
|
if [ -f /etc/init.d/syslog ]; then
|
||||||
$SUDO /etc/init.d/syslog restart > /dev/null 2>&1
|
/etc/init.d/syslog restart > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
$SUDO systemctl restart syslog.service > /dev/null 2>&1
|
systemctl restart syslog.service > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@@ -6423,10 +6423,7 @@ void Oam::addUMdisk(const int moduleID, std::string& volumeName, std::string& de
|
|||||||
int user;
|
int user;
|
||||||
user = getuid();
|
user = getuid();
|
||||||
|
|
||||||
if (user == 0)
|
|
||||||
cmd = "mkfs.ext2 -F " + device + " > /dev/null 2>&1";
|
cmd = "mkfs.ext2 -F " + device + " > /dev/null 2>&1";
|
||||||
else
|
|
||||||
cmd = "sudo mkfs.ext2 -F " + device + " > /dev/null 2>&1";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
@@ -6673,10 +6670,7 @@ void Oam::addDbroot(const int dbrootNumber, DBRootConfigList& dbrootlist, string
|
|||||||
int user;
|
int user;
|
||||||
user = getuid();
|
user = getuid();
|
||||||
|
|
||||||
if (user == 0)
|
|
||||||
cmd = "mkfs.ext2 -F " + amazonDeviceName + " > /tmp/format.log 2>&1";
|
cmd = "mkfs.ext2 -F " + amazonDeviceName + " > /tmp/format.log 2>&1";
|
||||||
else
|
|
||||||
cmd = "sudo mkfs.ext2 -F " + amazonDeviceName + " > /tmp/format.log 2>&1";
|
|
||||||
|
|
||||||
writeLog("addDbroot format cmd: " + cmd, LOG_TYPE_DEBUG );
|
writeLog("addDbroot format cmd: " + cmd, LOG_TYPE_DEBUG );
|
||||||
|
|
||||||
@@ -8660,20 +8654,10 @@ void Oam::syslogAction( std::string action)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int user;
|
|
||||||
user = getuid();
|
|
||||||
|
|
||||||
if (user == 0)
|
|
||||||
cmd = "systemctl " + action + " " + systemlog + ".service > /dev/null 2>&1";
|
cmd = "systemctl " + action + " " + systemlog + ".service > /dev/null 2>&1";
|
||||||
else
|
|
||||||
cmd = "sudo systemctl " + action + " " + systemlog + ".service > /dev/null 2>&1";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
if (user == 0)
|
cmd = "service " + systemlog + " " + action + " > /dev/null 2>&1";
|
||||||
cmd = "/service " + systemlog + " " + action + " > /dev/null 2>&1";
|
|
||||||
else
|
|
||||||
cmd = "sudo service" + systemlog + " " + action + " > /dev/null 2>&1";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// take action on syslog service
|
// take action on syslog service
|
||||||
@@ -8761,11 +8745,6 @@ int Oam::glusterctl(GLUSTER_COMMANDS command, std::string argument1, std::string
|
|||||||
|
|
||||||
string glustercmd = "gluster ";
|
string glustercmd = "gluster ";
|
||||||
|
|
||||||
if (user != 0)
|
|
||||||
{
|
|
||||||
glustercmd = "sudo " + glustercmd;
|
|
||||||
}
|
|
||||||
|
|
||||||
errmsg = "";
|
errmsg = "";
|
||||||
|
|
||||||
switch ( command )
|
switch ( command )
|
||||||
@@ -9022,7 +9001,7 @@ int Oam::glusterctl(GLUSTER_COMMANDS command, std::string argument1, std::string
|
|||||||
|
|
||||||
if (user != 0)
|
if (user != 0)
|
||||||
{
|
{
|
||||||
command = "sudo gluster volume set dbroot" + itoa(newDbrootID) + " storage.owner-uid " + itoa(user) + " >> /tmp/glusterCommands.txt 2>&1";;
|
command = "gluster volume set dbroot" + itoa(newDbrootID) + " storage.owner-uid " + itoa(user) + " >> /tmp/glusterCommands.txt 2>&1";;
|
||||||
status = system(command.c_str());
|
status = system(command.c_str());
|
||||||
|
|
||||||
if (WEXITSTATUS(status) != 0 )
|
if (WEXITSTATUS(status) != 0 )
|
||||||
@@ -9031,7 +9010,7 @@ int Oam::glusterctl(GLUSTER_COMMANDS command, std::string argument1, std::string
|
|||||||
exceptionControl("GLUSTER_ADD", API_FAILURE);
|
exceptionControl("GLUSTER_ADD", API_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
command = "sudo gluster volume set dbroot" + itoa(newDbrootID) + " storage.owner-gid " + itoa(group) + " >> /tmp/glusterCommands.txt 2>&1";;
|
command = "gluster volume set dbroot" + itoa(newDbrootID) + " storage.owner-gid " + itoa(group) + " >> /tmp/glusterCommands.txt 2>&1";;
|
||||||
status = system(command.c_str());
|
status = system(command.c_str());
|
||||||
|
|
||||||
if (WEXITSTATUS(status) != 0 )
|
if (WEXITSTATUS(status) != 0 )
|
||||||
@@ -9449,10 +9428,7 @@ std::string Oam::updateFstab(std::string device, std::string dbrootID)
|
|||||||
|
|
||||||
string cmd;
|
string cmd;
|
||||||
|
|
||||||
if (user == 0)
|
|
||||||
cmd = "grep /data" + dbrootID + " /etc/fstab > /dev/null 2>&1";
|
cmd = "grep /data" + dbrootID + " /etc/fstab > /dev/null 2>&1";
|
||||||
else
|
|
||||||
cmd = "sudo grep /data" + dbrootID + " /etc/fstab > /dev/null 2>&1";
|
|
||||||
|
|
||||||
int status = system(cmd.c_str());
|
int status = system(cmd.c_str());
|
||||||
|
|
||||||
@@ -9461,18 +9437,12 @@ std::string Oam::updateFstab(std::string device, std::string dbrootID)
|
|||||||
//update /etc/fstab with mount
|
//update /etc/fstab with mount
|
||||||
|
|
||||||
//update local fstab
|
//update local fstab
|
||||||
if (user == 0)
|
|
||||||
cmd = "echo " + entry + " >> /etc/fstab";
|
cmd = "echo " + entry + " >> /etc/fstab";
|
||||||
else
|
|
||||||
cmd = "sudo echo " + entry + " >> /etc/fstab";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user == 0)
|
|
||||||
cmd = "grep /data" + dbrootID + " " + InstallDir + "/local/etc/pm1/fstab > /dev/null 2>&1";
|
cmd = "grep /data" + dbrootID + " " + InstallDir + "/local/etc/pm1/fstab > /dev/null 2>&1";
|
||||||
else
|
|
||||||
cmd = "sudo grep /data" + dbrootID + " " + InstallDir + "/local/etc/pm1/fstab > /dev/null 2>&1";
|
|
||||||
|
|
||||||
status = system(cmd.c_str());
|
status = system(cmd.c_str());
|
||||||
|
|
||||||
|
@@ -400,10 +400,6 @@ int main(int argc, char* argv[])
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//store syslog config file in Calpont Config file
|
|
||||||
cmd = installDir + "/bin/syslogSetup.sh install > /dev/null 2>&1";
|
|
||||||
system(cmd.c_str());
|
|
||||||
|
|
||||||
//get PPackage Type
|
//get PPackage Type
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -951,8 +947,6 @@ bool setOSFiles(string parentOAMModuleName, int serverTypeInstall)
|
|||||||
string fileName = "/etc/" + files[i];
|
string fileName = "/etc/" + files[i];
|
||||||
|
|
||||||
//make a backup copy before changing
|
//make a backup copy before changing
|
||||||
if ( rootUser )
|
|
||||||
{
|
|
||||||
cmd = "rm -f " + fileName + ".columnstoreSave";
|
cmd = "rm -f " + fileName + ".columnstoreSave";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
@@ -969,25 +963,6 @@ bool setOSFiles(string parentOAMModuleName, int serverTypeInstall)
|
|||||||
cmd = "cp " + installDir + "/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont " + installDir + "/local/. > /dev/null 2>&1";
|
cmd = "cp " + installDir + "/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont " + installDir + "/local/. > /dev/null 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
cmd = "sudo rm -f " + fileName + ".columnstoreSave";
|
|
||||||
system(cmd.c_str());
|
|
||||||
|
|
||||||
cmd = "sudo cp " + fileName + " " + fileName + ".columnstoreSave > /dev/null 2>&1";
|
|
||||||
system(cmd.c_str());
|
|
||||||
|
|
||||||
cmd = "sudo cat " + installDir + "/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont >> " + fileName;
|
|
||||||
|
|
||||||
if (geteuid() == 0) system(cmd.c_str());
|
|
||||||
|
|
||||||
cmd = "sudo rm -f " + installDir + "/local/ " + files[i] + "*.calpont > /dev/null 2>&1";
|
|
||||||
system(cmd.c_str());
|
|
||||||
|
|
||||||
cmd = "sudo cp " + installDir + "/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont " + installDir + "/local/. > /dev/null 2>&1";
|
|
||||||
system(cmd.c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return allfound;
|
return allfound;
|
||||||
}
|
}
|
||||||
|
@@ -1190,8 +1190,8 @@ int main(int argc, char* argv[])
|
|||||||
// setup to start on reboot, for non-root amazon installs
|
// setup to start on reboot, for non-root amazon installs
|
||||||
if ( !rootUser )
|
if ( !rootUser )
|
||||||
{
|
{
|
||||||
system("sudo sed -i -e 's/#sudo runuser/sudo runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1");
|
system("sed -i -e 's/#runuser/runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1");
|
||||||
system("sudo chmod 666 /etc/fstab >/dev/null 2>&1");
|
system("chmod 666 /etc/fstab >/dev/null 2>&1");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !writeConfig(sysConfig) )
|
if ( !writeConfig(sysConfig) )
|
||||||
@@ -3612,17 +3612,7 @@ int main(int argc, char* argv[])
|
|||||||
//check if local MariaDB ColumnStore system logging is working
|
//check if local MariaDB ColumnStore system logging is working
|
||||||
cout << endl << "===== Checking MariaDB ColumnStore System Logging Functionality =====" << endl << endl;
|
cout << endl << "===== Checking MariaDB ColumnStore System Logging Functionality =====" << endl << endl;
|
||||||
|
|
||||||
if ( rootUser)
|
|
||||||
cmd = installDir + "/bin/syslogSetup.sh install > /dev/null 2>&1";
|
|
||||||
else
|
|
||||||
cmd = "sudo " + installDir + "/bin/syslogSetup.sh --installdir=" + installDir + " install > /dev/null 2>&1";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
|
||||||
|
|
||||||
if ( rootUser)
|
|
||||||
cmd = installDir + "/bin/syslogSetup.sh status > /dev/null 2>&1";
|
cmd = installDir + "/bin/syslogSetup.sh status > /dev/null 2>&1";
|
||||||
else
|
|
||||||
cmd = "sudo " + installDir + "/bin/syslogSetup.sh --installdir=" + installDir + " status > /dev/null 2>&1";
|
|
||||||
|
|
||||||
int ret = system(cmd.c_str());
|
int ret = system(cmd.c_str());
|
||||||
|
|
||||||
@@ -4068,22 +4058,13 @@ bool setOSFiles(string parentOAMModuleName, int serverTypeInstall)
|
|||||||
//make a backup copy before changing
|
//make a backup copy before changing
|
||||||
string cmd = "rm -f " + fileName + ".columnstoreSave";
|
string cmd = "rm -f " + fileName + ".columnstoreSave";
|
||||||
|
|
||||||
if ( !rootUser )
|
|
||||||
cmd = "sudo rm -f " + fileName + ".columnstoreSave";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
cmd = "cp " + fileName + " " + fileName + ".columnstoreSave > /dev/null 2>&1";
|
cmd = "cp " + fileName + " " + fileName + ".columnstoreSave > /dev/null 2>&1";
|
||||||
|
|
||||||
if ( !rootUser )
|
|
||||||
cmd = "sudo cp " + fileName + " " + fileName + ".columnstoreSave > /dev/null 2>&1";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
if ( rootUser )
|
|
||||||
cmd = "cat " + installDir + "/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont >> " + fileName;
|
cmd = "cat " + installDir + "/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont >> " + fileName;
|
||||||
else
|
|
||||||
cmd = "sudo bash -c 'sudo cat " + installDir + "/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont >> " + fileName + "'";
|
|
||||||
|
|
||||||
int rtnCode = system(cmd.c_str());
|
int rtnCode = system(cmd.c_str());
|
||||||
|
|
||||||
@@ -4385,7 +4366,7 @@ bool createDbrootDirs(string DBRootStorageType)
|
|||||||
|
|
||||||
if ( !rootUser)
|
if ( !rootUser)
|
||||||
{
|
{
|
||||||
cmd = "sudo chown -R " + USER + ":" + USER + " " + installDir + "/data1 > /dev/null";
|
cmd = "chown -R " + USER + ":" + USER + " " + installDir + "/data1 > /dev/null";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4845,10 +4826,7 @@ bool storageSetup(bool amazonInstall)
|
|||||||
//check if gluster is installed
|
//check if gluster is installed
|
||||||
int rtnCode = 1;
|
int rtnCode = 1;
|
||||||
|
|
||||||
if (rootUser)
|
|
||||||
rtnCode = system("gluster --version > /tmp/gluster.log 2>&1");
|
rtnCode = system("gluster --version > /tmp/gluster.log 2>&1");
|
||||||
else
|
|
||||||
rtnCode = system("sudo gluster --version > /tmp/gluster.log 2>&1");
|
|
||||||
|
|
||||||
if (rtnCode == 0)
|
if (rtnCode == 0)
|
||||||
{
|
{
|
||||||
@@ -5534,10 +5512,7 @@ bool updateBash()
|
|||||||
string cmd = "echo . " + installDir + "/bin/" + DataFileEnvFile + " >> " + fileName;
|
string cmd = "echo . " + installDir + "/bin/" + DataFileEnvFile + " >> " + fileName;
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
if ( rootUser)
|
|
||||||
cmd = "su - hdfs -c 'hadoop fs -mkdir -p " + installDir + ";hadoop fs -chown root:root " + installDir + "' >/dev/null 2>&1";
|
cmd = "su - hdfs -c 'hadoop fs -mkdir -p " + installDir + ";hadoop fs -chown root:root " + installDir + "' >/dev/null 2>&1";
|
||||||
else
|
|
||||||
cmd = "sudo su - hdfs -c 'hadoop fs -mkdir -p " + installDir + ";hadoop fs -chown " + USER + ":" + USER + " " + installDir + "' >/dev/null 2>&1";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
@@ -6425,66 +6400,6 @@ bool glusterSetup(string password)
|
|||||||
cout << "ERROR: failed to make directory(" << DataRedundancyConfigs[pm].pmIpAddr << "): '" << command << "'" << endl;
|
cout << "ERROR: failed to make directory(" << DataRedundancyConfigs[pm].pmIpAddr << "): '" << command << "'" << endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if (dataRedundancyStorage == 2)
|
|
||||||
{
|
|
||||||
//walk data storage locations and modify fstab to reflect the storage locations entered by user
|
|
||||||
vector<DataRedundancyStorageSetup>::iterator storageSetupIter=DataRedundancyConfigs[pm].storageLocations.begin();
|
|
||||||
for (; storageSetupIter < DataRedundancyConfigs[pm].storageLocations.end(); storageSetupIter++ )
|
|
||||||
{
|
|
||||||
if (rootUser)
|
|
||||||
{
|
|
||||||
command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password +
|
|
||||||
" 'echo " + (*storageSetupIter).storageLocation + " " +
|
|
||||||
installDir + "/gluster/brick" + oam.itoa(brick) + " " +
|
|
||||||
(*storageSetupIter).storageFilesytemType + " defaults 1 2 >> /etc/fstab'";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password +
|
|
||||||
" 'sudo bash -c `sudo echo " + (*storageSetupIter).storageLocation + " " +
|
|
||||||
installDir + "/gluster/brick" + oam.itoa(brick) + " " +
|
|
||||||
(*storageSetupIter).storageFilesytemType + " defaults 1 2 >> /etc/fstab`'";
|
|
||||||
}
|
|
||||||
status = system(command.c_str());
|
|
||||||
if (WEXITSTATUS(status) != 0 )
|
|
||||||
{
|
|
||||||
cout << "ERROR: command failed: " << command << endl;
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
if (rootUser)
|
|
||||||
{
|
|
||||||
command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password +
|
|
||||||
" 'mount " + installDir + "/gluster/brick" + oam.itoa(brick) + "'";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password +
|
|
||||||
" 'sudo bash -c `sudo mount " + installDir + "/gluster/brick" + oam.itoa(brick) + "`'";
|
|
||||||
}
|
|
||||||
status = system(command.c_str());
|
|
||||||
if (WEXITSTATUS(status) != 0 )
|
|
||||||
{
|
|
||||||
cout << "ERROR: command failed: " << command << endl;
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
if (!rootUser)
|
|
||||||
{
|
|
||||||
int user;
|
|
||||||
user = getuid();
|
|
||||||
command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password +
|
|
||||||
"'sudo bash -c `sudo chown -R " + oam.itoa(user) + ":" + oam.itoa(user) + " " + installDir + "/gluster/brick" + oam.itoa(brick) + "`'";
|
|
||||||
status = system(command.c_str());
|
|
||||||
if (WEXITSTATUS(status) != 0 )
|
|
||||||
{
|
|
||||||
cout << "ERROR(" << status <<"): command failed: " << command << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string errmsg1;
|
string errmsg1;
|
||||||
@@ -6499,14 +6414,7 @@ bool glusterSetup(string password)
|
|||||||
|
|
||||||
sleep(5);
|
sleep(5);
|
||||||
|
|
||||||
if (rootUser)
|
|
||||||
{
|
|
||||||
command = "gluster peer status >> /tmp/glusterCommands.txt 2>&1";
|
command = "gluster peer status >> /tmp/glusterCommands.txt 2>&1";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
command = "sudo gluster peer status >> /tmp/glusterCommands.txt 2>&1";
|
|
||||||
}
|
|
||||||
|
|
||||||
status = system(command.c_str());
|
status = system(command.c_str());
|
||||||
|
|
||||||
@@ -6531,14 +6439,7 @@ bool glusterSetup(string password)
|
|||||||
{
|
{
|
||||||
int dbrootID = db + 1;
|
int dbrootID = db + 1;
|
||||||
|
|
||||||
if (rootUser)
|
|
||||||
{
|
|
||||||
command = "gluster volume create dbroot" + oam.itoa(dbrootID) + " transport tcp replica " + oam.itoa(dataRedundancyCopies) + " ";
|
command = "gluster volume create dbroot" + oam.itoa(dbrootID) + " transport tcp replica " + oam.itoa(dataRedundancyCopies) + " ";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
command = "sudo gluster volume create dbroot" + oam.itoa(dbrootID) + " transport tcp replica " + oam.itoa(dataRedundancyCopies) + " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
vector<int>::iterator dbrootPmIter = dbrootPms[db].begin();
|
vector<int>::iterator dbrootPmIter = dbrootPms[db].begin();
|
||||||
|
|
||||||
@@ -6597,7 +6498,7 @@ bool glusterSetup(string password)
|
|||||||
{
|
{
|
||||||
int user = getuid();
|
int user = getuid();
|
||||||
int group = getgid();
|
int group = getgid();
|
||||||
command = "sudo gluster volume set dbroot" + oam.itoa(dbrootID) + " storage.owner-uid " + oam.itoa(user) + " >> /tmp/glusterCommands.txt 2>&1";;
|
command = "gluster volume set dbroot" + oam.itoa(dbrootID) + " storage.owner-uid " + oam.itoa(user) + " >> /tmp/glusterCommands.txt 2>&1";;
|
||||||
status = system(command.c_str());
|
status = system(command.c_str());
|
||||||
|
|
||||||
if (WEXITSTATUS(status) != 0 )
|
if (WEXITSTATUS(status) != 0 )
|
||||||
@@ -6606,7 +6507,7 @@ bool glusterSetup(string password)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
command = "sudo gluster volume set dbroot" + oam.itoa(dbrootID) + " storage.owner-gid " + oam.itoa(group) + " >> /tmp/glusterCommands.txt 2>&1";;
|
command = "gluster volume set dbroot" + oam.itoa(dbrootID) + " storage.owner-gid " + oam.itoa(group) + " >> /tmp/glusterCommands.txt 2>&1";;
|
||||||
status = system(command.c_str());
|
status = system(command.c_str());
|
||||||
|
|
||||||
if (WEXITSTATUS(status) != 0 )
|
if (WEXITSTATUS(status) != 0 )
|
||||||
@@ -6615,7 +6516,7 @@ bool glusterSetup(string password)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
command = "sudo gluster volume start dbroot" + oam.itoa(dbrootID) + " >> /tmp/glusterCommands.txt 2>&1";
|
command = "gluster volume start dbroot" + oam.itoa(dbrootID) + " >> /tmp/glusterCommands.txt 2>&1";
|
||||||
status = system(command.c_str());
|
status = system(command.c_str());
|
||||||
|
|
||||||
if (WEXITSTATUS(status) != 0 )
|
if (WEXITSTATUS(status) != 0 )
|
||||||
|
@@ -101,9 +101,6 @@ void msgProcessor()
|
|||||||
int user;
|
int user;
|
||||||
user = getuid();
|
user = getuid();
|
||||||
|
|
||||||
if (user != 0)
|
|
||||||
cmd = "sudo fuser -k " + port + "/tcp";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
|
@@ -475,10 +475,6 @@ static void messageThread(Configuration config)
|
|||||||
string port = sysConfig->getConfig("ProcMgr", "Port");
|
string port = sysConfig->getConfig("ProcMgr", "Port");
|
||||||
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
||||||
|
|
||||||
if ( !rootUser)
|
|
||||||
cmd = "sudo fuser -k " + port + "/tcp >/dev/null 2>&1";
|
|
||||||
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
@@ -563,9 +559,6 @@ static void alarmMessageThread(Configuration config)
|
|||||||
string port = sysConfig->getConfig("ProcMgr_Alarm", "Port");
|
string port = sysConfig->getConfig("ProcMgr_Alarm", "Port");
|
||||||
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
||||||
|
|
||||||
if ( !rootUser)
|
|
||||||
cmd = "sudo fuser -k " + port + "/tcp >/dev/null 2>&1";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
|
@@ -4937,7 +4937,7 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
|||||||
//clear out the known_host file, sometimes causes a failure on amazon during addModule
|
//clear out the known_host file, sometimes causes a failure on amazon during addModule
|
||||||
if ( amazon )
|
if ( amazon )
|
||||||
{
|
{
|
||||||
string cmd = "sudo unlink " + homedir + ".ssh/know_hosts > /dev/null 2>&1";
|
string cmd = "unlink " + homedir + ".ssh/know_hosts > /dev/null 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6298,7 +6298,7 @@ int ProcessManager::removeModule(oam::DeviceNetworkList devicenetworklist, bool
|
|||||||
homedir = p;
|
homedir = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
string cmd = "sudo unlink " + homedir + ".ssh/know_hosts > /dev/null 2>&1";
|
string cmd = "unlink " + homedir + ".ssh/know_hosts > /dev/null 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11057,7 +11057,7 @@ int ProcessManager::mountDBRoot(std::string dbrootID)
|
|||||||
|
|
||||||
if ( !rootUser)
|
if ( !rootUser)
|
||||||
{
|
{
|
||||||
cmd = "sudo chown -R " + USER + ":" + USER + " " + startup::StartUp::installDir() + "/data" + dbrootID + " > /dev/null";
|
cmd = "chown -R " + USER + ":" + USER + " " + startup::StartUp::installDir() + "/data" + dbrootID + " > /dev/null";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -134,13 +134,6 @@ int main(int argc, char** argv)
|
|||||||
if (p && *p)
|
if (p && *p)
|
||||||
USER = p;
|
USER = p;
|
||||||
|
|
||||||
// change permissions on /dev/shm
|
|
||||||
if ( !rootUser)
|
|
||||||
{
|
|
||||||
string cmd = "sudo chmod 777 /dev/shm >/dev/null 2>&1";
|
|
||||||
system(cmd.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
// get and set locale language
|
// get and set locale language
|
||||||
string systemLang = "C";
|
string systemLang = "C";
|
||||||
|
|
||||||
@@ -346,8 +339,8 @@ int main(int argc, char** argv)
|
|||||||
if ( count >= 120 )
|
if ( count >= 120 )
|
||||||
{
|
{
|
||||||
log.writeLog(__LINE__, "Standby PM not responding, infinidb shutting down", LOG_TYPE_CRITICAL);
|
log.writeLog(__LINE__, "Standby PM not responding, infinidb shutting down", LOG_TYPE_CRITICAL);
|
||||||
//Set the alarm
|
//Set the alarm, commented out. alarm require ProcMgr
|
||||||
aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET);
|
//aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET);
|
||||||
sleep (1);
|
sleep (1);
|
||||||
string cmd = startup::StartUp::installDir() + "/bin/infinidb stop > /dev/null 2>&1";
|
string cmd = startup::StartUp::installDir() + "/bin/infinidb stop > /dev/null 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
@@ -444,7 +437,7 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
log.writeLog(__LINE__, "wating for good return from getModuleStatus", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "waiting for good return from getModuleStatus", LOG_TYPE_DEBUG);
|
||||||
sleep (1);
|
sleep (1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -560,8 +553,8 @@ int main(int argc, char** argv)
|
|||||||
if ( retry == 20 )
|
if ( retry == 20 )
|
||||||
{
|
{
|
||||||
log.writeLog(__LINE__, "Check DB mounts failed, shutting down", LOG_TYPE_CRITICAL);
|
log.writeLog(__LINE__, "Check DB mounts failed, shutting down", LOG_TYPE_CRITICAL);
|
||||||
//Set the alarm
|
//Set the alarm, commented out. alarm require ProcMgr
|
||||||
aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET);
|
//aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET);
|
||||||
sleep (1);
|
sleep (1);
|
||||||
string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /dev/null 2>&1";
|
string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /dev/null 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
@@ -589,7 +582,7 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
while (!mainResumeFlag)
|
while (!mainResumeFlag)
|
||||||
{
|
{
|
||||||
log.writeLog(__LINE__, "WATING FOR mainResumeFlag to be set", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "WAITING FOR mainResumeFlag to be set", LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
@@ -1138,9 +1131,6 @@ static void messageThread(MonitorConfig config)
|
|||||||
|
|
||||||
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
||||||
|
|
||||||
if ( !rootUser)
|
|
||||||
cmd = "sudo fuser -k " + port + "/tcp >/dev/null 2>&1";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
@@ -2370,9 +2360,6 @@ static void statusControlThread()
|
|||||||
string port = sysConfig->getConfig(portName, "Port");
|
string port = sysConfig->getConfig(portName, "Port");
|
||||||
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
||||||
|
|
||||||
if ( !rootUser)
|
|
||||||
cmd = "sudo fuser -k " + port + "/tcp >/dev/null 2>&1";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
|
@@ -1027,7 +1027,7 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
|
|||||||
string cmd = "chmod 755 /dev/shm >/dev/null 2>&1";
|
string cmd = "chmod 755 /dev/shm >/dev/null 2>&1";
|
||||||
|
|
||||||
if ( !rootUser)
|
if ( !rootUser)
|
||||||
cmd = "sudo chmod 777 /dev/shm >/dev/null 2>&1";
|
cmd = "chmod 777 /dev/shm >/dev/null 2>&1";
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
@@ -1729,20 +1729,10 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
|
|||||||
if (!oam.checkLogStatus("/tmp/umount.txt", "busy"))
|
if (!oam.checkLogStatus("/tmp/umount.txt", "busy"))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ( rootUser)
|
|
||||||
{
|
|
||||||
cmd = "lsof " + startup::StartUp::installDir() + "/data" + dbrootID + " >> /tmp/umount.txt 2>&1";
|
cmd = "lsof " + startup::StartUp::installDir() + "/data" + dbrootID + " >> /tmp/umount.txt 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
cmd = "fuser -muvf " + startup::StartUp::installDir() + "/data" + dbrootID + " >> /tmp/umount.txt 2>&1";
|
cmd = "fuser -muvf " + startup::StartUp::installDir() + "/data" + dbrootID + " >> /tmp/umount.txt 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cmd = "sudo lsof " + startup::StartUp::installDir() + "/data" + dbrootID + " >> /tmp/umount.txt 2>&1";
|
|
||||||
system(cmd.c_str());
|
|
||||||
cmd = "sudo fuser -muvf " + startup::StartUp::installDir() + "/data" + dbrootID + " >> /tmp/umount.txt 2>&1";
|
|
||||||
system(cmd.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
sleep(2);
|
sleep(2);
|
||||||
//Flush the cache
|
//Flush the cache
|
||||||
@@ -1801,7 +1791,7 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
|
|||||||
|
|
||||||
if ( !rootUser)
|
if ( !rootUser)
|
||||||
{
|
{
|
||||||
cmd = "sudo chown -R " + USER + ":" + USER + " " + startup::StartUp::installDir() + "/data" + dbrootID + " > /dev/null";
|
cmd = "chown -R " + USER + ":" + USER + " " + startup::StartUp::installDir() + "/data" + dbrootID + " > /dev/null";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1842,16 +1832,8 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
|
|||||||
int status = system(cmd.c_str());
|
int status = system(cmd.c_str());
|
||||||
|
|
||||||
if (WEXITSTATUS(status) != 0 )
|
if (WEXITSTATUS(status) != 0 )
|
||||||
{
|
|
||||||
if ( rootUser)
|
|
||||||
{
|
{
|
||||||
cmd = "echo " + entry + " >> /etc/fstab";
|
cmd = "echo " + entry + " >> /etc/fstab";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cmd = "sudo echo " + entry + " >> /etc/fstab";
|
|
||||||
}
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
log.writeLog(__LINE__, "Add line entry to /etc/fstab : " + entry);
|
log.writeLog(__LINE__, "Add line entry to /etc/fstab : " + entry);
|
||||||
@@ -1862,15 +1844,8 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
|
|||||||
status = system(cmd.c_str());
|
status = system(cmd.c_str());
|
||||||
|
|
||||||
if (WEXITSTATUS(status) != 0 )
|
if (WEXITSTATUS(status) != 0 )
|
||||||
{
|
|
||||||
if ( rootUser)
|
|
||||||
{
|
{
|
||||||
cmd = "echo " + entry + " >> " + startup::StartUp::installDir() + "/local/etc/pm1/fstab";
|
cmd = "echo " + entry + " >> " + startup::StartUp::installDir() + "/local/etc/pm1/fstab";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cmd = "sudo echo " + entry + " >> " + startup::StartUp::installDir() + "/local/etc/pm1/fstab";
|
|
||||||
}
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
@@ -1882,14 +1857,7 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
|
|||||||
string::size_type pos1 = entry.find(" ", pos + 1);
|
string::size_type pos1 = entry.find(" ", pos + 1);
|
||||||
string directory = entry.substr(pos + 1, pos1 - pos);
|
string directory = entry.substr(pos + 1, pos1 - pos);
|
||||||
|
|
||||||
if ( rootUser)
|
|
||||||
{
|
|
||||||
cmd = "mkdir " + directory;
|
cmd = "mkdir " + directory;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cmd = "sudo mkdir " + directory;
|
|
||||||
}
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
log.writeLog(__LINE__, "create directory: " + directory);
|
log.writeLog(__LINE__, "create directory: " + directory);
|
||||||
@@ -3123,7 +3091,7 @@ int ProcessMonitor::updateLog(std::string action, std::string level)
|
|||||||
//if non-root, change file permissions so we can update it
|
//if non-root, change file permissions so we can update it
|
||||||
if ( !rootUser)
|
if ( !rootUser)
|
||||||
{
|
{
|
||||||
string cmd = "sudo chmod 666 " + fileName + " > /dev/null";
|
string cmd = "chmod 666 " + fileName + " > /dev/null";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5208,16 +5176,10 @@ int ProcessMonitor::changeMyCnf(std::string type)
|
|||||||
// set owner and permission
|
// set owner and permission
|
||||||
string cmd = "chmod 664 " + mycnfFile + " >/dev/null 2>&1";
|
string cmd = "chmod 664 " + mycnfFile + " >/dev/null 2>&1";
|
||||||
|
|
||||||
if ( !rootUser)
|
|
||||||
cmd = "sudo chmod 644 " + mycnfFile + " >/dev/null 2>&1";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
cmd = "chown mysql:mysql " + mycnfFile + " >/dev/null 2>&1";
|
cmd = "chown mysql:mysql " + mycnfFile + " >/dev/null 2>&1";
|
||||||
|
|
||||||
if ( !rootUser)
|
|
||||||
cmd = "sudo chown mysql:mysql " + mycnfFile + " >/dev/null 2>&1";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
// restart mysql
|
// restart mysql
|
||||||
@@ -5972,10 +5934,7 @@ bool ProcessMonitor::amazonVolumeCheck(int dbrootID)
|
|||||||
{
|
{
|
||||||
string cmd;
|
string cmd;
|
||||||
|
|
||||||
if ( rootUser)
|
|
||||||
cmd = "mount " + deviceName + " " + startup::StartUp::installDir() + "/mysql/db -t ext2 -o defaults > /tmp/um_mount.log";
|
cmd = "mount " + deviceName + " " + startup::StartUp::installDir() + "/mysql/db -t ext2 -o defaults > /tmp/um_mount.log";
|
||||||
else
|
|
||||||
cmd = "sudo mount " + deviceName + " " + startup::StartUp::installDir() + "/mysql/db -t ext2 -o defaults > /tmp/um_mount.log";
|
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
log.writeLog(__LINE__, "mount cmd: " + cmd, LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "mount cmd: " + cmd, LOG_TYPE_DEBUG);
|
||||||
@@ -6384,7 +6343,7 @@ int ProcessMonitor::checkDataMount()
|
|||||||
|
|
||||||
if ( !rootUser)
|
if ( !rootUser)
|
||||||
{
|
{
|
||||||
cmd = "sudo chown -R " + USER + ":" + USER + " " + dbroot + " > /dev/null";
|
cmd = "chown -R " + USER + ":" + USER + " " + dbroot + " > /dev/null";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6558,16 +6517,8 @@ int ProcessMonitor::glusterAssign(std::string dbrootID)
|
|||||||
moduleIPAddr = sysConfig->getConfig("SystemModuleConfig", dataDupIPaddr);
|
moduleIPAddr = sysConfig->getConfig("SystemModuleConfig", dataDupIPaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( rootUser)
|
|
||||||
{
|
|
||||||
command = "mount -tglusterfs -odirect-io-mode=enable " + moduleIPAddr + ":/dbroot" +
|
command = "mount -tglusterfs -odirect-io-mode=enable " + moduleIPAddr + ":/dbroot" +
|
||||||
dbrootID + " " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterAssign.txt 2>&1";
|
dbrootID + " " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterAssign.txt 2>&1";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
command = "sudo mount -tglusterfs -odirect-io-mode=enable " + moduleIPAddr + ":/dbroot" +
|
|
||||||
dbrootID + " " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterAssign.txt 2>&1";
|
|
||||||
}
|
|
||||||
|
|
||||||
int ret = system(command.c_str());
|
int ret = system(command.c_str());
|
||||||
|
|
||||||
@@ -6607,14 +6558,7 @@ int ProcessMonitor::glusterUnassign(std::string dbrootID)
|
|||||||
|
|
||||||
log.writeLog(__LINE__, "glusterUnassign called: " + dbrootID, LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "glusterUnassign called: " + dbrootID, LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
if ( rootUser)
|
|
||||||
{
|
|
||||||
command = "umount -f " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterUnassign.txt 2>&1";
|
command = "umount -f " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterUnassign.txt 2>&1";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
command = "sudo umount -f " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterUnassign.txt 2>&1";
|
|
||||||
}
|
|
||||||
|
|
||||||
int ret = system(command.c_str());
|
int ret = system(command.c_str());
|
||||||
|
|
||||||
|
@@ -268,7 +268,7 @@ checkLocalDir()
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
#remove any check tmp files from previous runs
|
#remove any check tmp files from previous runs
|
||||||
`sudo rm -f /tmp/*_check > /dev/null 2>&1`
|
`rm -f /tmp/*_check > /dev/null 2>&1`
|
||||||
|
|
||||||
#check /tmp and /dev/shm
|
#check /tmp and /dev/shm
|
||||||
pass=true
|
pass=true
|
||||||
@@ -346,10 +346,10 @@ checkRemoteDir()
|
|||||||
#
|
#
|
||||||
# remove old _check tmp files from remote servers
|
# remove old _check tmp files from remote servers
|
||||||
|
|
||||||
`sudo rm -f /tmp/*_check > /dev/null 2>&1`
|
`rm -f /tmp/*_check > /dev/null 2>&1`
|
||||||
|
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'sudo rm -f /tmp/*_check > /dev/null 2>&1' 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'rm -f /tmp/*_check > /dev/null 2>&1' 1 > /tmp/remote_command_check 2>&1`
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$USER" != "root" ]; then
|
if [ "$USER" != "root" ]; then
|
||||||
@@ -625,7 +625,7 @@ checkPorts()
|
|||||||
pass=true
|
pass=true
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
|
|
||||||
`sudo nmap $ipadd -p 8600-8630,8700,8800,3306 | grep 'filtered' > /tmp/port_test`
|
`nmap $ipadd -p 8600-8630,8700,8800,3306 | grep 'filtered' > /tmp/port_test`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo $ipadd " Node Passed port test"
|
echo $ipadd " Node Passed port test"
|
||||||
else
|
else
|
||||||
@@ -736,7 +736,7 @@ checkPackages()
|
|||||||
echo "** Run MariaDB ColumnStore Dependent Package Check"
|
echo "** Run MariaDB ColumnStore Dependent Package Check"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
declare -a CENTOS_PKG=("expect" "perl" "perl-DBI" "openssl" "zlib" "file" "sudo" "libaio" "rsync" "snappy" "net-tools")
|
declare -a CENTOS_PKG=("expect" "perl" "perl-DBI" "openssl" "zlib" "file" "libaio" "rsync" "snappy" "net-tools")
|
||||||
declare -a CENTOS_PKG_NOT=("mariadb-libs")
|
declare -a CENTOS_PKG_NOT=("mariadb-libs")
|
||||||
|
|
||||||
if [ "$OS" == "centos6" ] || [ "$OS" == "centos7" ]; then
|
if [ "$OS" == "centos6" ] || [ "$OS" == "centos7" ]; then
|
||||||
@@ -855,7 +855,7 @@ checkPackages()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -a SUSE_PKG=("boost-devel" "expect" "perl" "perl-DBI" "openssl" "file" "sudo" "libaio1" "rsync" "libsnappy1" "net-tools")
|
declare -a SUSE_PKG=("boost-devel" "expect" "perl" "perl-DBI" "openssl" "file" "libaio1" "rsync" "libsnappy1" "net-tools")
|
||||||
declare -a SUSE_PKG_NOT=("mariadb" , "libmariadb18")
|
declare -a SUSE_PKG_NOT=("mariadb" , "libmariadb18")
|
||||||
|
|
||||||
if [ "$OS" == "suse12" ]; then
|
if [ "$OS" == "suse12" ]; then
|
||||||
@@ -946,7 +946,7 @@ checkPackages()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -a UBUNTU_PKG=("libboost-all-dev" "expect" "libdbi-perl" "perl" "openssl" "file" "sudo" "libreadline-dev" "rsync" "libsnappy1V5" "net-tools")
|
declare -a UBUNTU_PKG=("libboost-all-dev" "expect" "libdbi-perl" "perl" "openssl" "file" "libreadline-dev" "rsync" "libsnappy1V5" "net-tools")
|
||||||
declare -a UBUNTU_PKG_NOT=("mariadb-server" "libmariadb18")
|
declare -a UBUNTU_PKG_NOT=("mariadb-server" "libmariadb18")
|
||||||
|
|
||||||
if [ "$OS" == "ubuntu16" ] ; then
|
if [ "$OS" == "ubuntu16" ] ; then
|
||||||
@@ -1063,7 +1063,7 @@ checkPackages()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -a DEBIAN_PKG=("libboost-all-dev" "expect" "libdbi-perl" "perl" "openssl" "file" "sudo" "libreadline-dev" "rsync" "libsnappy1" "net-tools")
|
declare -a DEBIAN_PKG=("libboost-all-dev" "expect" "libdbi-perl" "perl" "openssl" "file" "libreadline-dev" "rsync" "libsnappy1" "net-tools")
|
||||||
declare -a DEBIAN_PKG_NOT=("libmariadb18" "mariadb-server")
|
declare -a DEBIAN_PKG_NOT=("libmariadb18" "mariadb-server")
|
||||||
|
|
||||||
if [ "$OS" == "debian8" ]; then
|
if [ "$OS" == "debian8" ]; then
|
||||||
@@ -1180,7 +1180,7 @@ checkPackages()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -a DEBIAN9_PKG=("libboost-all-dev" "expect" "libdbi-perl" "perl" "openssl" "file" "sudo" "libreadline5" "rsync" "libsnappy1V5" "net-tools" "libaio1")
|
declare -a DEBIAN9_PKG=("libboost-all-dev" "expect" "libdbi-perl" "perl" "openssl" "file" "libreadline5" "rsync" "libsnappy1V5" "net-tools" "libaio1")
|
||||||
declare -a DEBIAN9_PKG_NOT=("libmariadb18" "mariadb-server")
|
declare -a DEBIAN9_PKG_NOT=("libmariadb18" "mariadb-server")
|
||||||
|
|
||||||
if [ "$OS" == "debian9" ]; then
|
if [ "$OS" == "debian9" ]; then
|
||||||
|
Reference in New Issue
Block a user