Hi,

On 7/20/05, Manas Laha <[EMAIL PROTECTED]> wrote:
> 
> On Tue, 2005-07-19 at 17:22 +0530, Manas Laha wrote:
> 
> >>Folks,
> >>
> >>What is the scene regarding writing CDs with cdrecord under kernel 2.6?
> >>Ide-scsi doesn't seem to be needed anymore. So, what options work best,
> >>etc.? What is the experience of you all here? I shall be grateful for
> >>any information.
> >>
> >>
> 
> Apropos of my earlier question and the answers I received in response, I
> am trying, in a shell script, to identify which IDE device my CDwriter
> is. At the moment the best I can think of is something like:
> 
>      dmesg | grep ATAPI | grep "ROM" | cut -d: -f1
> 
> On my system this works because I have only one CD device. However,
> other systems may have more. Is there a way to identify with certainty
> which is the CD writer?

I have a "samsung cd rom" and another "lite-on" cd/dvd writer. 
I check out the device with:
             cdrecord -scanbus dev=ATAPI  2>/dev/null
to look for lines for identifying my cd writer. For me, the name of
the company was good enough.
            cdrecord -scanbus dev=ATAPI  2>/dev/null |grep
'LITE-ON'|gawk {'print $1'}
gives the output: 0,1,0
I drop this in the command for actual burning.
         cdrecord -dev ATAPI:$(cdrecord -scanbus dev=ATAPI 
2>/dev/null |grep                   'LITE-ON'|gawk {'print $1'}) 
-data foo.iso

That does it for me.

-siddhartha




> 
> I have a shell script that lets me drive cdrecord, with its myriad
> options, as I need to. So far it assumed ide-scsi but now I want to
> generalise it so that it behaves according to the version of the kernel
> the machine is running. I am identifying the kernel version through:
> 
>     cut -d' ' -f3 < /proc/version | cut -d'.' -f1,2
> 
> I shall be grateful for any responses.
> 
> - Manas Laha
> 
> 
> *****************************************
> This Mail is Certified to be Virus Free.
> CIC Network Security Group, IIT Kharagpur
> *****************************************
> 
> --
> To unsubscribe, send mail to [EMAIL PROTECTED] with the body
> "unsubscribe ilug-cal" and an empty subject line.
> FAQ: http://www.ilug-cal.org/node.php?id=3
>


--
To unsubscribe, send mail to [EMAIL PROTECTED] with the body
"unsubscribe ilug-cal" and an empty subject line.
FAQ: http://www.ilug-cal.org/node.php?id=3

Reply via email to