F: installation fails on vanilla systems
This commit is contained in:
crestAT
2017-02-17 09:10:41 +01:00
parent afac4582a3
commit 7169a5df11
5 changed files with 20 additions and 9 deletions

View File

@@ -33,20 +33,20 @@
$command = "fail2ban_start.sh";
$cmd = dirname(__FILE__)."/".$command;
require_once("config.inc");
require_once("functions.inc");
// remove start/stop commands
// remove existing old rc format entries
if (is_array($config['rc']) && is_array($config['rc']['postinit']) && is_array( $config['rc']['postinit']['cmd'])) {
for ($i = 0; $i < count($config['rc']['postinit']['cmd']); ++$i) {
if (preg_match('/$command/', $config['rc']['postinit']['cmd'][$i])) unset($config['rc']['postinit']['cmd'][$i]);
$rc_param_count = count($config['rc']['postinit']['cmd']);
for ($i = 0; $i < $rc_param_count; $i++) {
if (preg_match("/{$command}/", $config['rc']['postinit']['cmd'][$i])) unset($config['rc']['postinit']['cmd'][$i]);
}
}
// remove existing entries for new rc format
if (is_array($config['rc']) && is_array($config['rc']['param'])) {
if (is_array($config['rc']) && is_array($config['rc']['param']['0'])) {
$rc_param_count = count($config['rc']['param']);
for ($i = 0; $i < $rc_param_count; $i++) {
if (preg_match('/$command/', $config['rc']['param'][$i]['value'])) unset($config['rc']['param'][$i]);
if (preg_match("/{$command}/", $config['rc']['param'][$i]['value'])) unset($config['rc']['param'][$i]);
}
}

View File

@@ -39,12 +39,12 @@ $cmd = dirname(__FILE__)."/".$command;
// remove existing old rc format entries
if (is_array($config['rc']) && is_array($config['rc']['postinit']) && is_array( $config['rc']['postinit']['cmd'])) {
$rc_param_count = count($config['rc']['postinit']['cmd']);
for ($i = 0; $i < $rc_param_count; ++$i) {
for ($i = 0; $i < $rc_param_count; $i++) {
if (preg_match("/{$command}/", $config['rc']['postinit']['cmd'][$i])) unset($config['rc']['postinit']['cmd'][$i]);
}
}
// remove existing entries for new rc format
if (is_array($config['rc']) && is_array($config['rc']['param'])) {
if (is_array($config['rc']) && is_array($config['rc']['param']['0'])) {
$rc_param_count = count($config['rc']['param']);
for ($i = 0; $i < $rc_param_count; $i++) {
if (preg_match("/{$command}/", $config['rc']['param'][$i]['value'])) unset($config['rc']['param'][$i]);

View File

@@ -29,7 +29,7 @@
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
*/
$v = "v0.3.4"; // extension version
$v = "v0.3.4.1"; // extension version
$appname = "OneButtonInstaller";
require_once("config.inc");
@@ -111,6 +111,8 @@ if ($release[0] >= 11.0) { // new rc format
$rc_param['comment'] = "Start {$appname} Extension";
$rc_param['typeid'] = '2';
$rc_param['enable'] = true;
if (!is_array($config['rc'])) $config['rc'] = [];
if (!is_array($config['rc']['param'])) $config['rc']['param'] = [];
$config['rc']['param'][] = $rc_param;
$config['onebuttoninstaller']['rc_uuid_start'] = $rc_param['uuid'];
@@ -123,6 +125,8 @@ if ($release[0] >= 11.0) { // new rc format
$rc_param['comment'] = "Stop {$appname} Extension";
$rc_param['typeid'] = '3';
$rc_param['enable'] = true;
if (!is_array($config['rc'])) $config['rc'] = [];
if (!is_array($config['rc']['param'])) $config['rc']['param'] = [];
$config['rc']['param'][] = $rc_param;
$config['onebuttoninstaller']['rc_uuid_stop'] = $rc_param['uuid'];
}

View File

@@ -1,4 +1,6 @@
Version Date Description
0.3.4.1 2017.02.17 F: installation fails on vanilla systems => http://forums.nas4free.org/viewtopic.php?f=71&t=11189&p=75515#p75357
0.3.4 2016.11.23 N: command scripts rc format for NAS4Free 11.x compatibility
N: MidnightCommander: command scripts rc format for NAS4Free 11.x compatibility
N: Chinese (Simplified) translation
@@ -8,6 +10,7 @@
C: update Spanish translation
C: update Ukrainian translation
C: MidnightCommander: symlinks for NAS4Free 11.x compatibility
0.3.3 2016.09.01 N: Turkish translation
N: Ukrainian translation
C: update Dutch translation
@@ -17,16 +20,20 @@
C: update Spanish translation
C: update Swedish translation
F: Configuration - fix table view if unsupported extension exists
0.3.2 2016.08.25 N: Configuration - add checkbox to enable the installation of extensions even if they are already installed
N: Swedish translation
C: update Greek translation
C: update German translation
0.3.1 2016.08.15 F: OBI installer - add checkbox to override restriction for extensions installation path
0.3 2016.08.14 N: Configuration - checkbox to override restriction for extensions installation path
(limited to a directory under /mnt/)
0.2 2016.08.09 N: Configuration - enable/disable beta releases in extensions list
N: check hardware platform to use midnightcommander on i386 too
F: disabling extension not possible, leads to an error message
0.1 2016.08.01 initial release
N: ... new feature

View File

@@ -1 +1 @@
0.3.4
0.3.4.1