Author: pebender
Date: Mon Dec 1 19:05:08 2008
New Revision: 4035
Modified:
trunk/gar-minimyth/html/minimyth/document-changelog.txt
trunk/gar-minimyth/html/minimyth/document-minimyth_conf.html
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/conf.d/MM_LIRC
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LIRC.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/04-minimyth-detect-lcdproc.rules.disabled
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/04-minimyth-detect-lirc.rules.disabled
Log:
- Reorganized lcdproc devices names.
- Converted persistent names from device names to device symbolic links.
- Moved persistent names into directory /dev/minimyth/lcdproc.
- Reorganized lirc device names.
- Converted persistent names from device names to device symbolic links.
- Moved persistent names into directory /dev/minimyth/lirc.
Modified: trunk/gar-minimyth/html/minimyth/document-changelog.txt
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-changelog.txt (original)
+++ trunk/gar-minimyth/html/minimyth/document-changelog.txt Mon Dec 1
19:05:08 2008
@@ -1,7 +1,7 @@
MiniMyth Changelog
--------------------------------------------------------------------------------
-Changes since 61 (2008-11-30):
+Changes since 61 (2008-12-01):
Current MythTV versions
MythTV 0.20-softpad: version 0.20.2.softpad, release-0-20-fixes branch
svn 16082,
@@ -13,6 +13,12 @@
MythTV trunk: version trunk.19186 trunk svn 19186
Modified init
+ - Reorganized lcdproc devices names.
+ - Converted persistent names from device names to device symbolic
links.
+ - Moved persistent names into directory /dev/minimyth/lcdproc.
+ - Reorganized lirc device names.
+ - Converted persistent names from device names to device symbolic
links.
+ - Moved persistent names into directory /dev/minimyth/lirc.
- Reorganized the /etc/lirc.d directory.
- Renamed some directories to shorten the names:
/etc/lirc.d/driver.conf.d -> /etc/lirc.d/driver.conf
Modified: trunk/gar-minimyth/html/minimyth/document-minimyth_conf.html
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-minimyth_conf.html
(original)
+++ trunk/gar-minimyth/html/minimyth/document-minimyth_conf.html Mon Dec
1
19:05:08 2008
@@ -2300,11 +2300,11 @@
</p>
<p>
When MiniMyth detects a remote control device,
- it gives it a persistent, unique (and somewhat cryptic)
device name
- (e.g. /dev/lirc-usb:{idVendor}:{idProduct}:{serial} or
/dev/tty-usb:{idVendor}:{idProduct}:{serial})
+ it adds a persistent name for the device
+ (/dev/minimyth/lirc/usb:{idVendor}:{idProduct}:{serial})
when possible.
- Devices given a persistent, unique name will have the same
name across reboots,
- enabling them to be easily included in the black list.
+ Since this persistent name is the same across reboots,
+ it can be easily included in the black list.
</p>
</dd>
<dt id="MM_LIRC_DRIVER"><strong>MM_LIRC_DRIVER</strong></dt>
@@ -2877,7 +2877,7 @@
alt="Valid CSS!" height="31" width="88" /></a>
</div>
<div class="version">
- Last Updated on 2008-11-10
+ Last Updated on 2008-12-01
<br />
< mailto : webmaster at minimyth dot org >
</div>
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/conf.d/MM_LIRC
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/conf.d/MM_LIRC
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.sh/init.d/conf.d/MM_LIRC
Mon Dec 1 19:05:08 2008
@@ -37,8 +37,10 @@
conf_default_MM_LIRC() {
local device
+ local device_blacklist
local device_item
local device_list
+ local driver
if /usr/bin/test -z "${MM_LIRC_DRIVER}" ; then
MM_LIRC_DRIVER='none'
@@ -140,14 +142,37 @@
fi
fi
+ # Convert device symlinks to device names.
device_list=
for device_item in ${MM_LIRC_DEVICE_LIST} ; do
device=`/bin/echo "${device_item}" | /usr/bin/cut -d ',' -f 1`
- if ! /bin/echo " ${MM_LIRC_DEVICE_BLACKLIST} " | /bin/grep -q "
${device} " ; then
- device_list="${device_list} ${device_item}"
+ driver=`/bin/echo "${device_item}" | /usr/bin/cut -d ',' -f 2`
+ if /usr/bin/test -e "${device}" ; then
+ device=`/sbin/udevadm info --query name --root
--name="${device}" 2> /dev/null`
fi
+ device_list="${device_list} ${device},${driver}"
done
MM_LIRC_DEVICE_LIST="${device_list}"
+
+ # Remove blacklisted devices from the list.
+ if /usr/bin/test -n "${MM_LIRC_DEVICE_BLACKLIST}" ; then
+ # Convert blackisted device symlinks to device names.
+ device_blacklist=
+ for device in ${MM_LIRC_DEVICE_BLACKLIST} ; do
+ if /usr/bin/test -e "${device}" ; then
+ device=`/sbin/udevadm info --query name --root
--name="${device}" 2> /dev/null`
+ fi
+ device_blacklist="${device_blacklist} ${device}"
+ done
+ device_list=
+ for device_item in ${MM_LIRC_DEVICE_LIST} ; do
+ device=`/bin/echo "${device_item}" | /usr/bin/cut -d ',' -f 1`
+ if ! /bin/echo " ${device_blacklist} " | /bin/grep -q "
${device} " ; then
+ device_list="${device_list} ${device_item}"
+ fi
+ done
+ MM_LIRC_DEVICE_LIST="${device_list}"
+ fi
return 0
}
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LIRC.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LIRC.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LIRC.pm
Mon Dec 1 19:05:08 2008
@@ -177,6 +177,24 @@
my $minimyth = shift;
my $name = shift;
+ my $device_canonicalize = sub
+ {
+ my $device = shift;
+
+ if (($device) && (-e $device) && (open(FILE, '-|',
qq(/sbin/udevadm info --query name --root --name='$device'))))
+ {
+ while (<FILE>)
+ {
+ chomp;
+ $device = $_;
+ last;
+ }
+ close(FILE);
+ }
+
+ return $device;
+ };
+
my @device_list;
# If the manual LIRC driver is not 'irtrans',
@@ -186,7 +204,7 @@
# so no LIRC device list is created.
if ($minimyth->var_get('MM_LIRC_DRIVER') ne 'irtrans')
{
- my $device = $minimyth->var_get('MM_LIRC_DEVICE');
+ my $device =
&{$device_canonicalize}($minimyth->var_get('MM_LIRC_DEVICE'));
my $driver = $minimyth->var_get('MM_LIRC_DRIVER');
if (($device) && ($driver))
{
@@ -194,10 +212,10 @@
}
if ($minimyth->var_get('MM_LIRC_AUTO_ENABLED') eq 'yes')
{
- foreach (@{$minimyth->detect_state_get('lirc')})
+ foreach my $item (@{$minimyth->detect_state_get('lirc')})
{
- my $device = $_->{'device'};
- my $driver = $_->{'driver'};
+ my $device =
&{$device_canonicalize}($item->{'device'});
+ my $driver = $item->{'driver'};
if (($device) && ($driver))
{
push(@device_list, "$device,$driver");
@@ -213,7 +231,15 @@
if ($minimyth->var_get('MM_LIRC_DEVICE_BLACKLIST'))
{
- my $blacklist_filter = join('|', split(/ +/,
$minimyth->var_get('MM_LIRC_DEVICE_BLACKLIST')));
+ my @blacklist = ();
+ foreach my $item (split(/ +/,
$minimyth->var_get('MM_LIRC_DEVICE_BLACKLIST')))
+ {
+ if ($item)
+ {
+ push(@blacklist, &{$device_canonicalize}($item));
+ }
+ }
+ my $blacklist_filter = join('|', @blacklist);
@device_list = grep(! /^($blacklist_filter),.+$/,
@device_list);
}
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/04-minimyth-detect-lcdproc.rules.disabled
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/04-minimyth-detect-lcdproc.rules.disabled
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/04-minimyth-detect-lcdproc.rules.disabled
Mon Dec 1 19:05:08 2008
@@ -38,7 +38,7 @@
ENV{mm_detect_id}=="usb:1b3d:0153", ENV{mm_detect_state_lcdproc}="MtxOrb"
# The state has been set, so give the device a persistent unique
identifier when possible.
-ENV{mm_detect_state_lcdproc}=="?*", PROGRAM="/lib/udev/mm_uid",
RESULT=="?*", NAME="$env{SUBSYSTEM}-$result", SYMLINK+="%k"
+ENV{mm_detect_state_lcdproc}=="?*", PROGRAM="/lib/udev/mm_uid",
RESULT=="?*", SYMLINK+="minimyth/lcdproc/$result"
# The state has been set, so save it.
ENV{mm_detect_state_lcdproc}=="?*", RUN+="/lib/udev/mm_detect lcdproc %k
$env{mm_detect_state_lcdproc} state_prepend_devname"
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/04-minimyth-detect-lirc.rules.disabled
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/04-minimyth-detect-lirc.rules.disabled
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/04-minimyth-detect-lirc.rules.disabled
Mon Dec 1 19:05:08 2008
@@ -50,8 +50,7 @@
LABEL="end-nonlirc"
# The state has been set, so give the device a persistent unique
identifier when possible.
-ENV{mm_detect_state_lirc}=="?*", SUBSYSTEM!="input",
PROGRAM="/lib/udev/mm_uid", RESULT=="?*", NAME="$env{SUBSYSTEM}-$result",
SYMLINK+="%k"
-ENV{mm_detect_state_lirc}=="?*", SUBSYSTEM=="input",
PROGRAM="/lib/udev/mm_uid", RESULT=="?*", NAME="$env{SUBSYSTEM}-$result",
SYMLINK+="input/%k"
+ENV{mm_detect_state_lirc}=="?*", PROGRAM="/lib/udev/mm_uid", RESULT=="?*",
SYMLINK+="minimyth/lirc/$result"
# The state has been set, so save it.
ENV{mm_detect_state_lirc}=="?*", RUN+="/lib/udev/mm_detect lirc %k
$env{mm_detect_state_lirc} state_prepend_devname"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---