diff --git a/emhttp/plugins/dynamix.plugin.manager/scripts/language b/emhttp/plugins/dynamix.plugin.manager/scripts/language index 2662af5c1..59874ad26 100755 --- a/emhttp/plugins/dynamix.plugin.manager/scripts/language +++ b/emhttp/plugins/dynamix.plugin.manager/scripts/language @@ -314,7 +314,7 @@ if ($method == 'install') { copy($xml_file, $lang_file); symlink($lang_file, $link_file); write("language: $lang language pack installed\n"); - logger("language: $lang language pack installed"); + logger("$lang language pack installed"); // run hook scripts for post processing post_hooks(); done(0); @@ -396,7 +396,7 @@ if ($method == 'update') { copy($xml_file, $lang_file); symlink($lang_file, $link_file); write("language: $lang language pack updated\n"); - logger("language: $lang language pack updated"); + logger("$lang language pack updated"); // run hook scripts for post processing post_hooks(); done(0); @@ -423,7 +423,7 @@ if ($method == 'remove') { done(1); } write("language: $lang language pack removed\n"); - logger("language: $lang language pack removed"); + logger("$lang language pack removed"); // run hook scripts for post processing post_hooks(); done(0); diff --git a/emhttp/plugins/dynamix.plugin.manager/scripts/plugin b/emhttp/plugins/dynamix.plugin.manager/scripts/plugin index fffe95d29..b4745a9be 100755 --- a/emhttp/plugins/dynamix.plugin.manager/scripts/plugin +++ b/emhttp/plugins/dynamix.plugin.manager/scripts/plugin @@ -382,12 +382,12 @@ function plugin($method, $plugin_file, &$error) { // If file already exists, check the SHA256/MD5 (if supplied) if (file_exists($name)) { if ($file->SHA256) { - logger("plugin: checking: $name - SHA256"); + logger("checking: $name - SHA256"); if (hash_file('sha256', $name) != $file->SHA256) { unlink($name); } } elseif ($file->MD5) { - logger("plugin: checking: $name - MD5"); + logger("checking: $name - MD5"); if (md5_file($name) != $file->MD5) { unlink($name); } @@ -396,12 +396,12 @@ function plugin($method, $plugin_file, &$error) { // If file already exists, do not overwrite // if (file_exists($name)) { - logger("plugin: skipping: $name already exists"); + logger("skipping: $name already exists"); } elseif ($file->LOCAL) { // Create the file // // for local file, just copy it - logger("plugin: creating: $name - copying LOCAL file $file->LOCAL"); + logger("creating: $name - copying LOCAL file $file->LOCAL"); if (!copy($file->LOCAL, $name)) { $error = "unable to copy LOCAL file: $name"; @unlink($name); @@ -409,10 +409,10 @@ function plugin($method, $plugin_file, &$error) { } } elseif ($file->INLINE) { // for inline file, create with inline contents - logger("plugin: creating: $name - from INLINE content"); + logger("creating: $name - from INLINE content"); $contents = trim($file->INLINE).PHP_EOL; if ($file->attributes()->Type == 'base64') { - logger("plugin: decoding: $name as base64"); + logger("decoding: $name as base64"); $contents = base64_decode($contents); if ($contents === false) { $error = "unable to decode inline base64: $name"; @@ -426,20 +426,20 @@ function plugin($method, $plugin_file, &$error) { } } elseif ($file->URL) { // for download file, download and maybe verify the file MD5 - logger("plugin: creating: $name - downloading from URL $file->URL"); + logger("creating: $name - downloading from URL $file->URL"); if ( (download($file->URL, $name, $error) === false) && (download(filter_url($file->URL), $name, $error) === false) ) { @unlink($name); return false; } if ($file->SHA256) { - logger("plugin: checking: $name - SHA256"); + logger("checking: $name - SHA256"); if (hash_file('sha256', $name) != $file->SHA256) { $error = "bad file SHA256: $name"; unlink($name); return false; } } elseif ($file->MD5) { - logger("plugin: checking: $name - MD5"); + logger("checking: $name - MD5"); if (md5_file($name) != $file->MD5) { $error = "bad file MD5: $name"; unlink($name); @@ -452,7 +452,7 @@ function plugin($method, $plugin_file, &$error) { if ($file->attributes()->Mode) { // if file has 'Mode' attribute, apply it $mode = $file->attributes()->Mode; - logger("plugin: setting: $name - mode to $mode"); + logger("setting: $name - mode to $mode"); if (!chmod($name, octdec($mode))) { $error = "chmod failure: $name"; return false; @@ -464,13 +464,13 @@ function plugin($method, $plugin_file, &$error) { if ($file->attributes()->Run) { $command = $file->attributes()->Run; if ($name) { - logger(escapeshellarg("plugin: running: $command $name")); + logger("running: $command $name"); $retval = run("$command $name"); } elseif ($file->LOCAL) { - logger(escapeshellarg("plugin: running: $command $file->LOCAL")); + logger("running: $command $file->LOCAL"); $retval = run("$command $file->LOCAL"); } elseif ($file->INLINE) { - logger("plugin: running: 'anonymous'"); + logger("running: 'anonymous'"); $name = '/tmp/inline.sh'; file_put_contents($name, $file->INLINE); $retval = run("$command $name"); @@ -718,7 +718,7 @@ if ($method == 'install') { if ($target != $plugin_file) copy($plugin_file, $target); symlink($target, $symlink); write("plugin: $plugin installed\n"); - logger("plugin: $plugin installed"); + logger("$plugin installed"); } else { write("script: $plugin executed\n"); logger("script: $plugin executed"); @@ -835,7 +835,7 @@ if ($method == 'update') { copy($plugin_file, $target); symlink($target, $symlink); write("plugin: $plugin updated\n"); - logger("plugin: $plugin updated"); + logger("$plugin updated"); // run hook scripts for post processing post_hooks(); done(0); @@ -867,7 +867,7 @@ if ($method == 'remove') { // remove the plugin file move($installed_plugin_file, "$boot-removed"); write("plugin: $plugin removed\n"); - logger("plugin: $plugin removed"); + logger("$plugin removed"); exec("/usr/local/sbin/update_cron"); // run hook scripts for post processing post_hooks();