diff --git a/ehcp/ehcpforceupdate.sh b/ehcp/ehcpforceupdate.sh index 342d0f2..c59d43f 100755 --- a/ehcp/ehcpforceupdate.sh +++ b/ehcp/ehcpforceupdate.sh @@ -2207,6 +2207,9 @@ function installNewPackages(){ # ifconfig aptgetInstall net-tools + + # Needed for PolicyD + aptgetInstall libdbd-mysql-perl } function getRidOfExtraPHPMyAdminAlias(){ diff --git a/ehcp/install_lib.php b/ehcp/install_lib.php index 06b251e..7253812 100755 --- a/ehcp/install_lib.php +++ b/ehcp/install_lib.php @@ -1496,7 +1496,12 @@ function installsql() { echo "extracting and importing sql to mysql:\n"; # check if ehcp db already exists... - $baglanti=@mysqli_connect("localhost", "root", $tmprootpass, "ehcp"); + $baglanti = false; + try + { + $baglanti=@mysqli_connect("localhost", "root", $tmprootpass, "ehcp"); + } + catch (exception $e){} if($baglanti){ @@ -1623,7 +1628,10 @@ function installsql() { function checkmysqlpass($user,$pass){ echo "mysql root pass being checked ...\n"; - $baglanti=@mysqli_connect("localhost", $user, $pass); + $baglanti = false; + try{ + $baglanti=@mysqli_connect("localhost", $user, $pass); + }catch (exception $e){} if(!$baglanti){ return false; } else return true; diff --git a/ehcp/install_main.sh b/ehcp/install_main.sh index 6c4da14..e56a2f5 100755 --- a/ehcp/install_main.sh +++ b/ehcp/install_main.sh @@ -2100,6 +2100,7 @@ function installPolicyD(){ # install prereqs aptgetInstall libconfig-inifiles-perl aptgetInstall libcache-fastmmap-perl + aptgetInstall libdbd-mysql-perl #create policyd users policyDUserCheck=$(cat /etc/passwd | grep "cbpolicyd")