Escape double quotes in device model family (#772)

This commit is contained in:
Shevchenko Vitaliy 2018-01-24 12:35:14 +02:00 committed by Ben Kochie
parent 111e3af437
commit 4ed49e73fb
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ parse_smartctl_info() {
local model_family='' device_model='' serial_number='' fw_version='' vendor='' product='' revision='' lun_id='' local model_family='' device_model='' serial_number='' fw_version='' vendor='' product='' revision='' lun_id=''
while read line ; do while read line ; do
info_type="$(echo "${line}" | cut -f1 -d: | tr ' ' '_')" info_type="$(echo "${line}" | cut -f1 -d: | tr ' ' '_')"
info_value="$(echo "${line}" | cut -f2- -d: | sed 's/^ \+//g')" info_value="$(echo "${line}" | cut -f2- -d: | sed 's/^ \+//g' | sed 's/"/\\"/')"
case "${info_type}" in case "${info_type}" in
Model_Family) model_family="${info_value}" ;; Model_Family) model_family="${info_value}" ;;
Device_Model) device_model="${info_value}" ;; Device_Model) device_model="${info_value}" ;;