Changeset 49469aa


Ignore:
Timestamp:
01/29/15 13:26:16 (6 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.1.2
Children:
9a5fee8
Parents:
5281ab9
Message:

Make the cdparanoia usage optional, depending on if it is installed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pcbsd-utils/pc-sysconfig/daemon/Backend-remdev.cpp

    r5281ab9 r49469aa  
    214214    }else{ 
    215215      //No filesystem, so it must be either nothing or an audio CD 
    216       //QStringList cdinfo = runShellCommand("cd-info -T --no-cddb --no-device-info  --no-disc-mode --dvd --no-header -q /dev/"+node); 
    217       //if( !cdinfo.filter("TRACK").filter("1").isEmpty() ){type = "CD-AUDIO"; } 
    218              
    219       //cdparanoia is much better about not disturbing the cd if it is running than cdinfo 
    220       QStringList cdinfo = runShellCommand("cdparanoia -Q -d /dev/"+node); 
    221       if( !cdinfo.filter("(audio tracks only)").isEmpty() ){ type = "CD-AUDIO"; } 
    222       else{ type = "CD-NONE"; } 
     216      if( QFile::exists("/usr/local/bin/cdparanoia") ){ 
     217        //cdparanoia is much better about not disturbing the cd if it is running than cd-info 
     218        QStringList cdinfo = runShellCommand("cdparanoia -Q -d /dev/"+node); 
     219        if( !cdinfo.filter("(audio tracks only)").isEmpty() ){ type = "CD-AUDIO"; } 
     220        else{ type = "CD-NONE"; }              
     221      }else{ 
     222        QStringList cdinfo = runShellCommand("cd-info -T --no-cddb --no-device-info  --no-disc-mode --dvd --no-header -q /dev/"+node); 
     223        if( !cdinfo.filter("TRACK").filter("1").isEmpty() ){type = "CD-AUDIO"; } 
     224        else{ type = "CD-NONE"; }              
     225      } 
     226 
    223227    } 
    224228  } 
Note: See TracChangeset for help on using the changeset viewer.