- cacti version installed -new install
# uname -a
Linux 2.6.34-rc6 64 bit openssuse 11.x
cacti home location - /usr/share/cacti
# rpm -qa | grep -i cacti
cacti-0.8.7e-9.1.noarch
plugin patch failed in some parts what can i do to resolve them ?
Here is whad i did:
# cd /usr/share/cacti
# wget -c http://mirror.cactiusers.org/downloads/ ... A-v2.6.zip
# unzip cacti-plugin-0.8.7e-PA-v2.6.zip
# chown -R wwwrun:www /usr/share/cacti/
# ll cacti-plugin-arch/cacti-plugin-0.8.7e-PA-v2.6.diff
-rw-r--r-- 1 wwwrun www 93070 Nov 22 16:50 cacti-plugin-arch/cacti-plugin-0.8.7e-PA-v2.6.diff
# patch -p1 -N < cacti-plugin-arch/cacti-plugin-0.8.7e-PA-v2.6.diff
patching file auth_changepassword.php
patching file auth_login.php
patching file data_sources.php
patching file graph_image.php
patching file graph.php
Hunk #1 succeeded at 98 (offset -2 lines).
Hunk #2 succeeded at 213 (offset -2 lines).
Hunk #3 succeeded at 246 (offset -2 lines).
patching file graphs_new.php
patching file graphs.php
patching file host.php
patching file include/auth.php
patching file include/bottom_footer.php
patching file include/global_arrays.php
Hunk #2 succeeded at 643 (offset -4 lines).
patching file include/global_constants.php
patching file include/global_form.php
patching file include/global.php
patching file include/global_settings.php
patching file include/plugins.php
patching file include/top_graph_header.php
Hunk #2 FAILED at 55.
Hunk #5 FAILED at 117.
Hunk #6 FAILED at 145.
3 out of 6 hunks FAILED -- saving rejects to file include/top_graph_header.php.rej
patching file include/top_header.php
patching file index.php
patching file lib/api_device.php
patching file lib/auth.php
patching file lib/functions.php
patching file lib/html_form.php
Hunk #1 succeeded at 655 (offset -67 lines).
Hunk #2 succeeded at 672 (offset -67 lines).
Hunk #3 succeeded at 693 (offset -67 lines).
patching file lib/html.php
patching file lib/plugins.php
patching file lib/poller.php
patching file lib/rrd.php
patching file lib/variables.php
patching file plugins/index.php
patching file plugins.php
patching file poller.php
patching file user_admin.php
patching file utilities.php
#
plugin patch failed for cacti-plugin-0.8.7e-PA-v2.6.diff
Moderators: Developers, Moderators
# cat include/top_graph_header.php.rej
# cat include/top_graph_header.php.rej
--- include/top_graph_header.php 2009-11-21 23:31:26.000000000 -0600
+++ include/top_graph_header.php 2009-11-21 23:20:04.000000000 -0600
@@ -55,41 +60,52 @@
$_SESSION["sess_nav_level_cache"][2]["url"] = "graph.php?local_graph_id=" . $_REQUEST["local_graph_id"] . "&rra_id=all";
}
+$page_title = api_plugin_hook_function('page_title', 'Cacti');
+
?>
<html>
<head>
- <title>Cacti</title>
+ <title><?php echo $page_title; ?></title>
<?php if (isset($_SESSION["custom"])) {
if ($_SESSION["custom"]) {
print "<meta http-equiv=refresh content='99999'>\r\n";
}else{
- print "<meta http-equiv=refresh content='" . htmlspecialchars(read_graph_config_option("page_refresh"),ENT_QUOTES) . "'>\r\n";
+ $refresh = api_plugin_hook_function('top_graph_refresh', read_graph_config_option('page_refresh'));
+ print "<meta http-equiv=refresh content='" . $refresh . "'>\r\n";
}
}
?>
- <link href="include/main.css" rel="stylesheet">
- <link href="images/favicon.ico" rel="shortcut icon"/>
- <script type="text/javascript" src="include/layout.js"></script>
- <script type="text/javascript" src="include/treeview/ua.js"></script>
- <script type="text/javascript" src="include/treeview/ftiens4.js"></script>
- <script type="text/javascript" src="include/jscalendar/calendar.js"></script>
- <script type="text/javascript" src="include/jscalendar/lang/calendar-en.js"></script>
- <script type="text/javascript" src="include/jscalendar/calendar-setup.js"></script>
+ <link href="<?php echo $config['url_path']; ?>include/main.css" rel="stylesheet">
+ <link href="<?php echo $config['url_path']; ?>images/favicon.ico" rel="shortcut icon"/>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/layout.js"></script>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/treeview/ua.js"></script>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/treeview/ftiens4.js"></script>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/calendar.js"></script>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/lang/calendar-en.js"></script>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/calendar-setup.js"></script>
+ <?php api_plugin_hook('page_head'); ?>
</head>
-<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<?php if ($oper_mode == OPER_MODE_NATIVE) {?>
+<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" <?php print api_plugin_hook_function("body_style", "");?>>
<a name='page_top'></a>
+<?php }else{?>
+<body leftmargin="15" topmargin="15" marginwidth="15" marginheight="15" <?php print api_plugin_hook_function("body_style", "");?>>
+<?php }?>
<table width="100%" height="100%" cellspacing="0" cellpadding="0">
+<?php if ($oper_mode == OPER_MODE_NATIVE) { ;?>
<tr height="25" bgcolor="#a9a9a9" class="noprint">
<td colspan="2" valign="bottom" nowrap>
<table width="100%" cellspacing="0" cellpadding="0">
- <tr style="background: transparent url('images/cacti_backdrop2.gif') no-repeat center right;">
+ <tr style="background: transparent url('<?php echo $config['url_path']; ?>images/cacti_backdrop2.gif') no-repeat center right;">
<td id="tabs" nowrap>
- <?php if ($show_console_tab == true) {?><a href="index.php"><img src="images/tab_console.gif" alt="Console" align="absmiddle" border="0"></a><?php }?><a href="graph_view.php"><img src="images/tab_graphs<?php if ((substr(basename($_SERVER["PHP_SELF"]),0,5) == "graph") || (basename($_SERVER["PHP_SELF"]) == "graph_settings.php")) { print "_down"; } print ".gif";?>" alt="Graphs" align="absmiddle" border="0"></a>
+ <?php if ($show_console_tab == true) {?><a href="<?php echo $config['url_path']; ?>index.php"><img src="<?php echo $config['url_path']; ?>images/tab_console.gif" alt="Console" align="absmiddle" border="0"></a><?php }?><a href="<?php echo $config['url_path']; ?>graph_view.php"><img src="<?php echo $config['url_path']; ?>images/tab_graphs<?php if ((substr(basename($_SERVER["PHP_SELF"]),0,5) == "graph") || (basename($_SERVER["PHP_SELF"]) == "graph_settings.php")) { print "_down"; } print ".gif";?>" alt="Graphs" align="absmiddle" border="0"></a><?php
+ api_plugin_hook('top_graph_header_tabs');
+ ?>
</td>
<td id="gtabs" align="right" nowrap>
- <?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["graph_settings"] == "on")) { print '<a href="graph_settings.php"><img src="images/tab_settings'; if (basename($_SERVER["PHP_SELF"]) == "graph_settings.php") { print "_down"; } print '.gif" border="0" alt="Settings" align="absmiddle"></a>';}?> <?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_tree"] == "on")) {?><a href="graph_view.php?action=tree"><img src="images/tab_mode_tree<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "tree") { print "_down"; }?>.gif" border="0" title="Tree View" alt="Tree View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_list"] == "on")) {?><a href="graph_view.php?action=list"><img src="images/tab_mode_list<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "list") { print "_down"; }?>.gif" border="0" title="List View" alt="List View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_preview"] == "on")) {?><a href="graph_view.php?action=preview"><img src="images/tab_mode_preview<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "preview") { print "_down"; }?>.gif" border="0" title="Preview View" alt="Preview View" align="absmiddle"></a><?php }?> <br>
+ <?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["graph_settings"] == "on")) { print '<a href="' . $config['url_path'] . 'graph_settings.php"><img src="' . $config['url_path'] . 'images/tab_settings'; if (basename($_SERVER["PHP_SELF"]) == "graph_settings.php") { print "_down"; } print '.gif" border="0" alt="Settings" align="absmiddle"></a>';}?> <?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_tree"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=tree"><img src="<?php echo $config['url_path']; ?>images/tab_mode_tree<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "tree") { print "_down"; }?>.gif" border="0" title="Tree View" alt="Tree View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_list"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=list"><img src="<?php echo $config['url_path']; ?>images/tab_mode_list<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "list") { print "_down"; }?>.gif" border="0" title="List View" alt="List View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_preview"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=preview"><img src="<?php echo $config['url_path']; ?>images/tab_mode_preview<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "preview") { print "_down"; }?>.gif" border="0" title="Preview View" alt="Preview View" align="absmiddle"></a><?php }?> <br>
</td>
</tr>
</table>
@@ -117,10 +133,10 @@
</td>
</tr>
<tr class="noprint">
- <td bgcolor="#efefef" colspan="1" height="8" style="background-image: url(images/shadow_gray.gif); background-repeat: repeat-x; border-right: #aaaaaa 1px solid;">
- <img src="images/transparent_line.gif" width="<?php print htmlspecialchars(read_graph_config_option("default_dual_pane_width"));?>" height="2" border="0"><br>
+ <td bgcolor="#efefef" colspan="1" height="8" style="background-image: url(<?php echo $config['url_path']; ?>images/shadow_gray.gif); background-repeat: repeat-x; border-right: #aaaaaa 1px solid;">
+ <img src="<?php echo $config['url_path']; ?>images/transparent_line.gif" width="<?php print htmlspecialchars(read_graph_config_option("default_dual_pane_width"));?>" height="2" border="0"><br>
</td>
- <td bgcolor="#ffffff" colspan="1" height="8" style="background-image: url(images/shadow.gif); background-repeat: repeat-x;">
+ <td bgcolor="#ffffff" colspan="1" height="8" style="background-image: url(<?php echo $config['url_path']; ?>images/shadow.gif); background-repeat: repeat-x;">
</td>
</tr>
@@ -145,10 +161,10 @@
?>
</td>
</tr>
- <?php }?>
-
+ <?php }
+ } ?>
<tr>
- <?php if ((read_graph_config_option("default_tree_view_mode") == "2") && (($_REQUEST["action"] == "tree") || ((isset($_REQUEST["view_type"]) ? $_REQUEST["view_type"] : "") == "tree"))) { ?>
+ <?php if ((read_graph_config_option("default_tree_view_mode") == "2") && ((isset($_REQUEST["action"]) && $_REQUEST["action"] == "tree") || ((isset($_REQUEST["view_type"]) ? $_REQUEST["view_type"] : "") == "tree"))) { ?>
<td valign="top" style="padding: 5px; border-right: #aaaaaa 1px solid;" bgcolor='#efefef' width='<?php print htmlspecialchars(read_graph_config_option("default_dual_pane_width"));?>' class='noprint'>
<table border=0 cellpadding=0 cellspacing=0><tr><td><font size=-2><a style="font-size:7pt;text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank></a></font></td></tr></table>
<?php grow_dhtml_trees(); ?>
--- include/top_graph_header.php 2009-11-21 23:31:26.000000000 -0600
+++ include/top_graph_header.php 2009-11-21 23:20:04.000000000 -0600
@@ -55,41 +60,52 @@
$_SESSION["sess_nav_level_cache"][2]["url"] = "graph.php?local_graph_id=" . $_REQUEST["local_graph_id"] . "&rra_id=all";
}
+$page_title = api_plugin_hook_function('page_title', 'Cacti');
+
?>
<html>
<head>
- <title>Cacti</title>
+ <title><?php echo $page_title; ?></title>
<?php if (isset($_SESSION["custom"])) {
if ($_SESSION["custom"]) {
print "<meta http-equiv=refresh content='99999'>\r\n";
}else{
- print "<meta http-equiv=refresh content='" . htmlspecialchars(read_graph_config_option("page_refresh"),ENT_QUOTES) . "'>\r\n";
+ $refresh = api_plugin_hook_function('top_graph_refresh', read_graph_config_option('page_refresh'));
+ print "<meta http-equiv=refresh content='" . $refresh . "'>\r\n";
}
}
?>
- <link href="include/main.css" rel="stylesheet">
- <link href="images/favicon.ico" rel="shortcut icon"/>
- <script type="text/javascript" src="include/layout.js"></script>
- <script type="text/javascript" src="include/treeview/ua.js"></script>
- <script type="text/javascript" src="include/treeview/ftiens4.js"></script>
- <script type="text/javascript" src="include/jscalendar/calendar.js"></script>
- <script type="text/javascript" src="include/jscalendar/lang/calendar-en.js"></script>
- <script type="text/javascript" src="include/jscalendar/calendar-setup.js"></script>
+ <link href="<?php echo $config['url_path']; ?>include/main.css" rel="stylesheet">
+ <link href="<?php echo $config['url_path']; ?>images/favicon.ico" rel="shortcut icon"/>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/layout.js"></script>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/treeview/ua.js"></script>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/treeview/ftiens4.js"></script>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/calendar.js"></script>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/lang/calendar-en.js"></script>
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/calendar-setup.js"></script>
+ <?php api_plugin_hook('page_head'); ?>
</head>
-<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<?php if ($oper_mode == OPER_MODE_NATIVE) {?>
+<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" <?php print api_plugin_hook_function("body_style", "");?>>
<a name='page_top'></a>
+<?php }else{?>
+<body leftmargin="15" topmargin="15" marginwidth="15" marginheight="15" <?php print api_plugin_hook_function("body_style", "");?>>
+<?php }?>
<table width="100%" height="100%" cellspacing="0" cellpadding="0">
+<?php if ($oper_mode == OPER_MODE_NATIVE) { ;?>
<tr height="25" bgcolor="#a9a9a9" class="noprint">
<td colspan="2" valign="bottom" nowrap>
<table width="100%" cellspacing="0" cellpadding="0">
- <tr style="background: transparent url('images/cacti_backdrop2.gif') no-repeat center right;">
+ <tr style="background: transparent url('<?php echo $config['url_path']; ?>images/cacti_backdrop2.gif') no-repeat center right;">
<td id="tabs" nowrap>
- <?php if ($show_console_tab == true) {?><a href="index.php"><img src="images/tab_console.gif" alt="Console" align="absmiddle" border="0"></a><?php }?><a href="graph_view.php"><img src="images/tab_graphs<?php if ((substr(basename($_SERVER["PHP_SELF"]),0,5) == "graph") || (basename($_SERVER["PHP_SELF"]) == "graph_settings.php")) { print "_down"; } print ".gif";?>" alt="Graphs" align="absmiddle" border="0"></a>
+ <?php if ($show_console_tab == true) {?><a href="<?php echo $config['url_path']; ?>index.php"><img src="<?php echo $config['url_path']; ?>images/tab_console.gif" alt="Console" align="absmiddle" border="0"></a><?php }?><a href="<?php echo $config['url_path']; ?>graph_view.php"><img src="<?php echo $config['url_path']; ?>images/tab_graphs<?php if ((substr(basename($_SERVER["PHP_SELF"]),0,5) == "graph") || (basename($_SERVER["PHP_SELF"]) == "graph_settings.php")) { print "_down"; } print ".gif";?>" alt="Graphs" align="absmiddle" border="0"></a><?php
+ api_plugin_hook('top_graph_header_tabs');
+ ?>
</td>
<td id="gtabs" align="right" nowrap>
- <?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["graph_settings"] == "on")) { print '<a href="graph_settings.php"><img src="images/tab_settings'; if (basename($_SERVER["PHP_SELF"]) == "graph_settings.php") { print "_down"; } print '.gif" border="0" alt="Settings" align="absmiddle"></a>';}?> <?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_tree"] == "on")) {?><a href="graph_view.php?action=tree"><img src="images/tab_mode_tree<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "tree") { print "_down"; }?>.gif" border="0" title="Tree View" alt="Tree View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_list"] == "on")) {?><a href="graph_view.php?action=list"><img src="images/tab_mode_list<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "list") { print "_down"; }?>.gif" border="0" title="List View" alt="List View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_preview"] == "on")) {?><a href="graph_view.php?action=preview"><img src="images/tab_mode_preview<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "preview") { print "_down"; }?>.gif" border="0" title="Preview View" alt="Preview View" align="absmiddle"></a><?php }?> <br>
+ <?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["graph_settings"] == "on")) { print '<a href="' . $config['url_path'] . 'graph_settings.php"><img src="' . $config['url_path'] . 'images/tab_settings'; if (basename($_SERVER["PHP_SELF"]) == "graph_settings.php") { print "_down"; } print '.gif" border="0" alt="Settings" align="absmiddle"></a>';}?> <?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_tree"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=tree"><img src="<?php echo $config['url_path']; ?>images/tab_mode_tree<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "tree") { print "_down"; }?>.gif" border="0" title="Tree View" alt="Tree View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_list"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=list"><img src="<?php echo $config['url_path']; ?>images/tab_mode_list<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "list") { print "_down"; }?>.gif" border="0" title="List View" alt="List View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_preview"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=preview"><img src="<?php echo $config['url_path']; ?>images/tab_mode_preview<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "preview") { print "_down"; }?>.gif" border="0" title="Preview View" alt="Preview View" align="absmiddle"></a><?php }?> <br>
</td>
</tr>
</table>
@@ -117,10 +133,10 @@
</td>
</tr>
<tr class="noprint">
- <td bgcolor="#efefef" colspan="1" height="8" style="background-image: url(images/shadow_gray.gif); background-repeat: repeat-x; border-right: #aaaaaa 1px solid;">
- <img src="images/transparent_line.gif" width="<?php print htmlspecialchars(read_graph_config_option("default_dual_pane_width"));?>" height="2" border="0"><br>
+ <td bgcolor="#efefef" colspan="1" height="8" style="background-image: url(<?php echo $config['url_path']; ?>images/shadow_gray.gif); background-repeat: repeat-x; border-right: #aaaaaa 1px solid;">
+ <img src="<?php echo $config['url_path']; ?>images/transparent_line.gif" width="<?php print htmlspecialchars(read_graph_config_option("default_dual_pane_width"));?>" height="2" border="0"><br>
</td>
- <td bgcolor="#ffffff" colspan="1" height="8" style="background-image: url(images/shadow.gif); background-repeat: repeat-x;">
+ <td bgcolor="#ffffff" colspan="1" height="8" style="background-image: url(<?php echo $config['url_path']; ?>images/shadow.gif); background-repeat: repeat-x;">
</td>
</tr>
@@ -145,10 +161,10 @@
?>
</td>
</tr>
- <?php }?>
-
+ <?php }
+ } ?>
<tr>
- <?php if ((read_graph_config_option("default_tree_view_mode") == "2") && (($_REQUEST["action"] == "tree") || ((isset($_REQUEST["view_type"]) ? $_REQUEST["view_type"] : "") == "tree"))) { ?>
+ <?php if ((read_graph_config_option("default_tree_view_mode") == "2") && ((isset($_REQUEST["action"]) && $_REQUEST["action"] == "tree") || ((isset($_REQUEST["view_type"]) ? $_REQUEST["view_type"] : "") == "tree"))) { ?>
<td valign="top" style="padding: 5px; border-right: #aaaaaa 1px solid;" bgcolor='#efefef' width='<?php print htmlspecialchars(read_graph_config_option("default_dual_pane_width"));?>' class='noprint'>
<table border=0 cellpadding=0 cellspacing=0><tr><td><font size=-2><a style="font-size:7pt;text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank></a></font></td></tr></table>
<?php grow_dhtml_trees(); ?>
Who is online
Users browsing this forum: No registered users and 0 guests