File powerpc-utils.bug-936383_snap-ignore_deprecated_network_files.patch of Package powerpc-utils.908
From b5fbf27d0a5143bcceb1ccabf944e255503cff78 Mon Sep 17 00:00:00 2001
From: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Date: Mon, 29 Jun 2015 14:12:06 +0530
Subject: [PATCH 1/2] scripts/snap: Ignore deprecated /proc/ network files
[upstream commit 40b7c2847318b5f9d0ac91aa7bbc37b6e4638f6f]
Teach snap to ignore deprecated sysctl network files, while
gathering information from /proc. Reading deprecated file,
throws warnings in /var/log/message like:
kernel: process `snap' is using deprecated sysctl (syscall)
net.ipv6.neigh.default.retrans_time; Use net.ipv6.neigh.default.retrans_time_ms instead.`
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
---
snap | 7 +++++++
1 file changed, 7 insertions(+)
Index: powerpc-utils-1.2.22/scripts/snap
===================================================================
--- powerpc-utils-1.2.22.orig/scripts/snap
+++ powerpc-utils-1.2.22/scripts/snap
@@ -147,6 +147,12 @@ my @snap_command_rsxx = (
"rs_cardreport -d 'all'",
);
+# Files, which are to be ignored as they are deprecated
+my @snap_deprecated_files = (
+ "retrans_time",
+ "base_reachable_time",
+);
+
sub recurse_dir($); # function prototype
sub error {
@@ -263,6 +269,7 @@ sub recurse_dir ($) {
recurse_dir "$dir/$file";
}
else {
+ next if (grep { /$file/ } @snap_deprecated_files);
copy "$dir/$file", $outdir."$dir/$file";
}
}