summaryrefslogtreecommitdiffstats
path: root/move/tools/nfs-accesses
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2005-08-22 14:57:05 +0000
committerMystery Man <unknown@mandriva.org>2005-08-22 14:57:05 +0000
commitc4c6eb3de2799d5544e9cc8703b0261c0a3350d6 (patch)
treeb9f1a4c99ae89c4210c2c2848b16e66430b63700 /move/tools/nfs-accesses
parenta723a6e26fc5be438675cc29b636f0b61547ec32 (diff)
downloaddrakx-10_3_0_48mdk.tar
drakx-10_3_0_48mdk.tar.gz
drakx-10_3_0_48mdk.tar.bz2
drakx-10_3_0_48mdk.tar.xz
drakx-10_3_0_48mdk.zip
This commit was manufactured by cvs2svn to create tagV10_3_0_48mdk
'V10_3_0_48mdk'.
Diffstat (limited to 'move/tools/nfs-accesses')
-rwxr-xr-xmove/tools/nfs-accesses67
1 files changed, 0 insertions, 67 deletions
diff --git a/move/tools/nfs-accesses b/move/tools/nfs-accesses
deleted file mode 100755
index f27de0d37..000000000
--- a/move/tools/nfs-accesses
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/perl
-
-use MDK::Common;
-use Getopt::Long;
-
-my $first_file;
-my $log_file = '/var/log/kernel/warnings';
-
-GetOptions('no-link' => \ (my $no_link),
- 'no-dir' => \ (my $no_dir),
- 'full-dirs=s', \ (my $full_dirs),
- 'ip=s' => \ (my $wanted_ip),
- 'log-file=s' => \$log_file,
- 'first-file=s' => \ (my $first_file),
- 'from-time=s', => \ (my $from_time),
- 'already-have=s', \ (my $already_have),
- );
-
-my @skipped_dirs = (
- '/usr/share/fonts',
- '/lib/modules/2.4.22-21mdk',
- '/usr/X11R6/lib/modules/extensions',
- '/usr/X11R6/lib/X11/fonts',
- '/usr/lib/kbd/keymaps',
- '/usr/share/locale',
- '/etc/skel',
- );
-
-my $skipped_dirs = '/tmp/live_tree(' . join('|', map { quotemeta } @skipped_dirs) . ')/';
-if ($full_dirs) {
- my @l = chomp_(map { MDK::Common::File::cat_or_die($_) } split(' ', $full_dirs));
- $full_dirs = '/tmp/live_tree(' . join('|', map { quotemeta } @l) . ')/';
-}
-if ($already_have) {
- my @l = map { chomp_(MDK::Common::File::cat_or_die($_)) } split(' ', $already_have);
- $already_have = '(' . join('|', map { quotemeta } @l) . ')';
-}
-
-open(my $F, "tac $log_file |");
-
-my @l;
-while (<$F>) {
- my ($time, $ip, $rfile) = /(\d+:\d+:\d+).*kernel: nfsd \((.*?)\): (.*)/ or next;
-
- if ($wanted_ip) {
- $wanted_ip eq $ip or next;
- } else {
- warn "choosing $ip\n";
- $wanted_ip = $ip;
- }
- my $file = join('/', '', reverse split('/', $rfile));
-
- last if $file =~ m!/tmp/live_tree/move/(devices|symlinks)!;
- last if $from_time && $time le $from_time;
-
- $already_have && $file =~ /^$already_have$/ and next;
-
- if ($file !~ /^$skipped_dirs/) {
- if (-l $file ? !$no_link : -d $file ? !$no_dir : 1) {
- my $s = $full_dirs && $file =~ /^$full_dirs/ ? "/tmp/live_tree$1" : $file;
- unshift @l, $s;
- }
- }
- last if $first_file && ($file eq "/tmp/live_tree$first_file" || $rfile eq $first_file);
-}
-
-print "$_\n" foreach sort(uniq(@l));