Copyright Michael Stefaniuc <mstefani@redhat.com> for Red Hat.

Do not print empty PID:, VID: and SN: lines. Most entries from
"show inventory raw" have those empty bloating up the saved config.

--- ./bin/rancid.in.empty	2006-08-18 11:55:24.000000000 +0200
+++ ./bin/rancid.in	2006-08-18 12:03:56.000000000 +0200
@@ -1196,9 +1196,13 @@
 	    ProcessHistory("INVENTORY","","", sprintf("!%-30s %s\n", $1, $2));
 	    next;
 	}
-	# split PID/VID line
-	if (/^(PID: \S*)\s*, (VID: \S*)\s*, (SN: \S*)\s*$/) {
-	    ProcessHistory("INVENTORY","","", "!$1\n!$2\n!$3\n");
+	# split PID/VID/SN line
+	if (/^PID: (\S*)\s*, VID: (\S*)\s*, SN: (\S*)\s*$/) {
+	    my $entries = "";
+	    $entries .= "!PID: $1\n" if ($1);
+	    $entries .= "!VID: $2\n" if ($2);
+	    $entries .= "!SN: $3\n" if ($3);
+	    ProcessHistory("INVENTORY","","", "$entries");
 	    next;
 	}
 	ProcessHistory("INVENTORY","","","!$_");