diff options
author | ivan <ivan> | 2009-05-03 00:40:50 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-05-03 00:40:50 +0000 |
commit | ae8f98d14eb70d671e808d41167ae6afb2ee7053 (patch) | |
tree | db0e7b6d23a5069c9ed674bbf4cb54f4ae2d9ae6 /bin | |
parent | 5bdd15fbc33d0e273e787a49bfdeb014cf83481d (diff) |
confdiff
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/confdiff | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/bin/confdiff b/bin/confdiff new file mode 100755 index 000000000..5b6af859e --- /dev/null +++ b/bin/confdiff @@ -0,0 +1,27 @@ +#!/usr/bin/perl + +use FS::UID qw(adminsuidsetup); +use FS::Conf; + +adminsuidsetup('ivan'); + +my $conf = new FS::Conf; + +my $file2 = pop @ARGV; +my $file1 = pop @ARGV; + +open(FILE1, ">/tmp/$file1") or die "can't open /tmp/$file1: $!"; +print FILE1 $conf->config($file1); +print FILE1 "\n"; +close FILE1 or die $!; + +open(FILE2, ">/tmp/$file2") or die "can't open /tmp/$file2: $!"; +print FILE2 $conf->config($file2); +print FILE2 "\n"; +close FILE2 or die $!; + +my @opt = @ARGV; + +system('diff', @opt, "/tmp/$file1", "/tmp/$file2"); + +#unlink("/tmp/$file1', "/tmp/$file2"); |