When I look at /var/lib/squeezecenter/cache/Forkoutput1.txt, I see that
file is fill of strings like 'load cdrom please and press enter'
without CR at the end of the string.
The string repeats a lot in the file all on one line.
I checked for control characters and did not find any:
[EMAIL PROTECTED]:/usr/share/squeezecenter/IR$ wc -l
/var/lib/squeezecenter/cache/Forkoutput1.txt
1 /var/lib/squeezecenter/cache/Forkoutput1.txt
[EMAIL PROTECTED]:/usr/share/squeezecenter/IR$ ls -l
/var/lib/squeezecenter/cache/Forkoutput1.txt
-rw-r--r-- 1 squeezecenter nogroup 3368752 2008-12-04 22:50
/var/lib/squeezecenter/cache/Forkoutput1.txt
...
I do not understand why the string repeats but anyway this change would
make the trick:
< if ($line eq "load cdrom please and press enter") {
> if ($line =~ "load cdrom please and press enter") {
Also here after is an easy and really quick way to detect is a disk is
inserted in the drive under unix:
[EMAIL PROTECTED]:~/sbin$ dd if=/dev/cdrom of=/dev/null count=1
dd: opening `/dev/cdrom': No medium found
[EMAIL PROTECTED]:~/sbin$ echo $?
1
The RC=1 but I would not check the RC because even when there is a CDA
in the tray dd returns 1:
[EMAIL PROTECTED]:~/sbin$ dd if=/dev/cdrom of=/dev/null count=1
dd: reading `/dev/cdrom': Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.0151643 s, 0.0 kB/s
[EMAIL PROTECTED]:~/sbin$ echo $?
1
Best regards,
Pierre
--
zorglups
------------------------------------------------------------------------
zorglups's Profile: http://forums.slimdevices.com/member.php?userid=21106
View this thread: http://forums.slimdevices.com/showthread.php?t=47288
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins