oharel wrote:Cigamit wrote:
patch -p1 -N < cacti-plugin-arch.diff
this is what i get:
C:\cygwin\bin>patch -p1 -N < C:\Apache\Apache\htdocs\cacti\plugins\monitor\cact
i-plugin-arch.diff
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur cacti-0.8.6d/include/config_arrays.php cacti/include/config_arrays.p
hp
|--- cacti-0.8.6d/include/config_arrays.php 2005-04-26 19:47:36.000000000 -0
500
|+++ cacti/include/config_arrays.php 2005-05-10 00:08:04.000000000 -0500
--------------------------
File to patch:
i get pretty much the same on a linux machine i have Cacti installed on.
what am i doing wrong?
also, which files should i backup exactly before doing this?
thanks
Harel
Um.. I see a few things that are not correct, try doing this...
copy the file to C:\Apache\Apache\htdocs\cacti\
then
cd C:\Apache\Apache\htdocs\cacti\
C:\cygwin\bin\patch -p1 -N < cacti-plugin-arch.diff
That should do it, you have to be in the cacti directory (and so does the patch) when you run the patch command. You were also putting it in cacti/plugins/monitor/cacti, which would also cause some problems (thats not the "cacti" directory).
If that doesn't work, then you might want to put C:\cygwin\bin in the system path and then do
cd C:\Apache\Apache\htdocs\cacti\
patch -p1 -N < cacti-plugin-arch.diff
Also, I noticed that I trimmed the extra new line off the end of the file, you may want to go to the bottom of the patch file, and put a blank line, otherwise it tells you that it ended abruptly (even though everything still patches correctly)
As far as what you should backup... this is what it patches, so the minimum I would do is these and the SQL database. Granted the include/plugins.php and plugins/index.php do not exist yet, so you can't back them up.
[root@localhost cacti-0.8.6d]# patch -p1 -N < cacti-plugin-arch.diff
patching file include/config_arrays.php
patching file include/config_form.php
patching file include/config.php
patching file include/config_settings.php
patching file include/plugins.php
patching file include/top_graph_header.php
patching file include/top_header.php
patching file lib/api_device.php
patching file lib/functions.php
patching file plugins/index.php