diff options
| author | Paul C. Buetow (mars.fritz.box) <paul@buetow.org> | 2014-06-21 11:16:30 +0200 |
|---|---|---|
| committer | Paul C. Buetow (mars.fritz.box) <paul@buetow.org> | 2014-06-21 11:16:30 +0200 |
| commit | 6d65ada43dbb6e4d715e4f6515fdbdce8116b3e8 (patch) | |
| tree | d3061ed408a656edb09635170a24a3c2f32f3525 | |
| parent | 5df48fce7c860f68e5d8045a343758de8b8b3983 (diff) | |
works0.1.0
| -rw-r--r-- | README.txt | 37 | ||||
| -rw-r--r-- | docs/netdiff.1 | 40 | ||||
| -rw-r--r-- | docs/netdiff.pod | 10 | ||||
| -rw-r--r-- | docs/netdiff.txt | 37 | ||||
| -rwxr-xr-x | src/netdiff | 2 |
5 files changed, 100 insertions, 26 deletions
@@ -1,12 +1,16 @@ NAME - netdiff - A netdiff project + netdiff - A simple script to diff a file or a directory of two hosts + over the network. -WTF? - A simple script to diff two files via the network. + This is very helpfull if you want to find out any difference of these + two hosts. - usage - ClusterSSH onto two hosts at the same time and run on both hosts the - same command like: + SYNOPSYS + netdiff HOSTNAME PATH [ADDITIONAL DIFF OPTS] + + USAGE + Cluster-SSH into two hosts at the same time and run on both hosts the + same (simultaneous): netdiff HOSTNAME PATH @@ -14,6 +18,27 @@ WTF? Depending on this the script will decide to be the client or the server role. + And where PATH musst be a full qualified path to a file or a directory. + + Netdiff transfers everything in PATH (recursively and encrypted via + OpenSSL/AES) to the other host and computes a diff of it. + + EXAMPLE + A common use case is to find out the differences of the PAM + configuration. On most systems the PAM configuration is spread into + several small configuration files which are hard to compare by hand + between two hosts. + + Given two hosts one.example.com and two.example.com. Just run this + command on both hosts: + + netdiff one.example.com /etc/pam.d + + The same affect, but the other way around would be the following + command: + + netdiff two.example.com /etc/pam.d + LICENSE See package description or project website. diff --git a/docs/netdiff.1 b/docs/netdiff.1 index e0a652f..a91c0a4 100644 --- a/docs/netdiff.1 +++ b/docs/netdiff.1 @@ -124,25 +124,49 @@ .\" ======================================================================== .\" .IX Title "NETDIFF 1" -.TH NETDIFF 1 "2014-06-20" "netdiff 0.0.4devel1" "User Commands" +.TH NETDIFF 1 "2014-06-21" "netdiff 0.0.4devel1" "User Commands" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" -netdiff \- A netdiff project -.SH "WTF?" -.IX Header "WTF?" -A simple script to diff two files via the network. -.SS "usage" -.IX Subsection "usage" -ClusterSSH onto two hosts at the same time and run on both hosts the same command like: +netdiff \- A simple script to diff a file or a directory of two hosts over the network. +.PP +This is very helpfull if you want to find out any difference of these two hosts. +.SS "\s-1SYNOPSYS\s0" +.IX Subsection "SYNOPSYS" +.Vb 1 +\& netdiff HOSTNAME PATH [ADDITIONAL DIFF OPTS] +.Ve +.SS "\s-1USAGE\s0" +.IX Subsection "USAGE" +Cluster-SSH into two hosts at the same time and run on both hosts the same +(simultaneous): .PP .Vb 1 \& netdiff HOSTNAME PATH .Ve .PP Where \s-1HOSTNAME\s0 can be the hostname of the first or the second host. Depending on this the script will decide to be the client or the server role. +.PP +And where \s-1PATH\s0 musst be a full qualified path to a file or a directory. +.PP +Netdiff transfers everything in \s-1PATH\s0 (recursively and encrypted via OpenSSL/AES) to the other host and computes a diff of it. +.SS "\s-1EXAMPLE\s0" +.IX Subsection "EXAMPLE" +A common use case is to find out the differences of the \s-1PAM\s0 configuration. On most systems the \s-1PAM\s0 configuration is spread into several small configuration files which are hard to compare by hand between two hosts. +.PP +Given two hosts one.example.com and two.example.com. Just run this command on both hosts: +.PP +.Vb 1 +\& netdiff one.example.com /etc/pam.d +.Ve +.PP +The same affect, but the other way around would be the following command: +.PP +.Vb 1 +\& netdiff two.example.com /etc/pam.d +.Ve .SH "LICENSE" .IX Header "LICENSE" See package description or project website. diff --git a/docs/netdiff.pod b/docs/netdiff.pod index b4c04ce..c4aa53c 100644 --- a/docs/netdiff.pod +++ b/docs/netdiff.pod @@ -1,19 +1,19 @@ =head1 NAME -netdiff - A netdiff project +netdiff - A simple script to diff a file or a directory of two hosts over the network. -=head1 WTF? +This is very helpfull if you want to find out any difference of these two hosts. -A simple script to diff a file or a directory of two hosts over the network. +=head2 SYNOPSYS -This is very helpfull if you want to find out any difference of these two hosts. + netdiff HOSTNAME PATH [ADDITIONAL DIFF OPTS] =head2 USAGE Cluster-SSH into two hosts at the same time and run on both hosts the same (simultaneous): - netdiff HOSTNAME PATH + netdiff HOSTNAME PATH Where HOSTNAME can be the hostname of the first or the second host. Depending on this the script will decide to be the client or the server role. diff --git a/docs/netdiff.txt b/docs/netdiff.txt index 367a201..9f659a6 100644 --- a/docs/netdiff.txt +++ b/docs/netdiff.txt @@ -1,12 +1,16 @@ NAME - netdiff - A netdiff project + netdiff - A simple script to diff a file or a directory of two hosts + over the network. -WTF? - A simple script to diff two files via the network. + This is very helpfull if you want to find out any difference of these + two hosts. - usage - ClusterSSH onto two hosts at the same time and run on both hosts the - same command like: + SYNOPSYS + netdiff HOSTNAME PATH [ADDITIONAL DIFF OPTS] + + USAGE + Cluster-SSH into two hosts at the same time and run on both hosts the + same (simultaneous): netdiff HOSTNAME PATH @@ -14,6 +18,27 @@ WTF? Depending on this the script will decide to be the client or the server role. + And where PATH musst be a full qualified path to a file or a directory. + + Netdiff transfers everything in PATH (recursively and encrypted via + OpenSSL/AES) to the other host and computes a diff of it. + + EXAMPLE + A common use case is to find out the differences of the PAM + configuration. On most systems the PAM configuration is spread into + several small configuration files which are hard to compare by hand + between two hosts. + + Given two hosts one.example.com and two.example.com. Just run this + command on both hosts: + + netdiff one.example.com /etc/pam.d + + The same affect, but the other way around would be the following + command: + + netdiff two.example.com /etc/pam.d + LICENSE See package description or project website. diff --git a/src/netdiff b/src/netdiff index e666154..d6ade31 100755 --- a/src/netdiff +++ b/src/netdiff @@ -52,7 +52,7 @@ if [ ${RC} -ne 0 ]; then # Default trouble exit status of diff RC=2 else - diff $@ "${WHAT}" ${TMPWHAT} ${DIFF_OPTS} + diff $@ "${WHAT}" "${TMPWHAT}/${BASENAME}" ${DIFF_OPTS} RC=$? fi |
