~kissiel/checkbox/fix-1397109

« back to all changes in this revision

Viewing changes to providers/plainbox-provider-checkbox/bin/storage_test

  • Committer: Daniel Manrique
  • Author(s): Rod Smith
  • Date: 2014-12-15 20:56:51 UTC
  • mfrom: (3504.1.1 not-found-error)
  • Revision ID: daniel_manrique-20141215205651-od245zbhyhn1tq7r
"automatic merge of lp:~rodsmith/checkbox/not-found-error/ by tarmac [r=zkrynicki][bug=1402810][author=rodsmith]"

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    echo "$disk is a block device"
38
38
    
39
39
    #Add a check for warnings
40
 
    WARN=$(parted -l -s |grep "^Warning.*${disk}.*[Rr]ead-only" 2>&1)
41
 
    if $?
 
40
    WARN=$(parted -s ${disk} print | grep "^Warning.*${disk}.*[Rr]ead-only" 2>&1)
 
41
    if [[ $? == 0 ]]
42
42
    then
43
43
        echo "Warning found in parted output:"
44
44
        echo $WARN
45
45
        echo "Aborting Test"
46
46
        exit 1
47
47
    fi
48
 
    
 
48
 
49
49
    # Regex changed to better handle when $disk appears more than once
50
50
    # in parted output (such as in warning messages or not caught in the
51
51
    # check above)