1*24226c4fSGopichand Paturi#!/usr/bin/env bash
2*24226c4fSGopichand Paturi#
3*24226c4fSGopichand Paturi# config: 2 50
4*24226c4fSGopichand Paturi# @brief: Collect VPD persistent data
5*24226c4fSGopichand Paturi#
6*24226c4fSGopichand Paturi
7*24226c4fSGopichand Paturi. $DREPORT_INCLUDE/functions
8*24226c4fSGopichand Paturi
9*24226c4fSGopichand Paturifile_name="/var/lib/vpd"
10*24226c4fSGopichand Paturidesc="VPD persistent data"
11*24226c4fSGopichand Paturi
12*24226c4fSGopichand Paturiif [ -d "$file_name" ]; then
13*24226c4fSGopichand Paturi    add_copy_file "$file_name" "$desc"
14*24226c4fSGopichand Paturielse
15*24226c4fSGopichand Paturi    log_info "No $desc data"
16*24226c4fSGopichand Paturifi
17*24226c4fSGopichand Paturi
18*24226c4fSGopichand Paturidesc="Bad VPD"
19*24226c4fSGopichand Paturidir_name="/tmp/bad-vpd"
20*24226c4fSGopichand Paturi
21*24226c4fSGopichand Paturiif [ -f $dir_name ]; then
22*24226c4fSGopichand Paturi    add_copy_file "$dir_name" "$desc"
23*24226c4fSGopichand Paturielse
24*24226c4fSGopichand Paturi    log_info "No $desc data"
25*24226c4fSGopichand Paturifi
26