Author: pebender
Date: Wed May 20 18:49:51 2009
New Revision: 4801
Modified:
trunk/gar-minimyth/html/minimyth/document-changelog.txt
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_HARDWARE.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LCDPROC.pm
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/lcdproc.pm
Log:
- Added the LCDproc kernel module to the manual kernel module list.
- A modprobe.conf file is created for the LCDproc kernel module
options.
- The LCDproc device is checked for by MM_LCDPROC_DEVICE.
- Added LIRC device checking by MM_LIRC_DEVICE.
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 Wed May 20
18:49:51 2009
@@ -46,9 +46,14 @@
and ends.
- Switched to using persistent device symlinks rather than device names
for LCDproc, LIRC and event devices when possible.
+ - Added the LCDproc kernel module to the manual kernel module list.
+ - A modprobe.conf file is created for the LCDproc kernel module
+ options.
+ - The LCDproc device is checked for by MM_LCDPROC_DEVICE.
- Added the LIRC kernel module to the manual kernel module list.
- A modprobe.conf file is created for the LIRC kernel module
options.
+ - The LCDproc device is checked for by MM_LIRC_DEVICE.
- Added the MythPhone kernel module to the manual kernel module list.
Improved MythV slave backend support.
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_HARDWARE.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_HARDWARE.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_HARDWARE.pm
Wed May 20 18:49:51 2009
@@ -15,7 +15,7 @@
$var_list{'MM_HARDWARE_KERNEL_MODULE_LIST'} =
{
- prerequisite =>
['MM_CPU_KERNEL_MODULE_LIST', 'MM_LIRC_KERNEL_MODULE_LIST',
'MM_PLUGIN_KERNEL_MODULE_LIST', 'MM_X_KERNEL_MODULE_LIST'],
+ prerequisite =>
['MM_CPU_KERNEL_MODULE_LIST', 'MM_LCDPROC_KERNEL_MODULE_LIST',
'MM_LIRC_KERNEL_MODULE_LIST', 'MM_PLUGIN_KERNEL_MODULE_LIST',
'MM_X_KERNEL_MODULE_LIST'],
value_default => '',
extra => sub
{
@@ -24,7 +24,7 @@
my @kernel_modules = split(/ +/, $minimyth->var_get($name));
- foreach my $delta_name ('CPU', 'LIRC', 'PLUGIN', 'X')
+ foreach my $delta_name ('CPU', 'LCDPROC', 'LIRC', 'PLUGIN', 'X')
{
my $delta_kernel_modules = $minimyth->var_get('MM_' .
$delta_name . '_KERNEL_MODULE_LIST');
if ($delta_kernel_modules)
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LCDPROC.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LCDPROC.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LCDPROC.pm
Wed May 20 18:49:51 2009
@@ -64,7 +64,21 @@
}
return $auto;
},
- value_none => ''
+ value_none => '',
+ extra => sub
+ {
+ my $minimyth = shift;
+ my $name = shift;
+
+ my $device = $minimyth->var_get($name);
+ if (($device) && (! -e $device))
+ {
+ $minimyth->message_output('err', "LCD/VFD device '$device'
specified by '$name' does not exist.");
+ return 0;
+ }
+
+ return 1;
+ }
};
$var_list{'MM_LCDPROC_KERNEL_MODULE'} =
{
@@ -133,6 +147,51 @@
value_file => 'yes',
file => {'name_remote' => '/LCDd.conf',
'name_local' => '/etc/LCDd.conf'}
+};
+$var_list{'MM_LCDPROC_KERNEL_MODULE_LIST'} =
+{
+ prerequisite =>
['MM_LCDPROC_KERNEL_MODULE', 'MM_LCDPROC_KERNEL_MODULE_OPTIONS'],
+ value_clean => sub
+ {
+ my $minimyth = shift;
+ my $name = shift;
+
+ $minimyth->var_set($name, 'auto');
+
+ return 1;
+ },
+ value_default => 'auto',
+ value_valid => 'auto',
+ value_auto => sub
+ {
+ my $minimyth = shift;
+ my $name = shift;
+
+ return $minimyth->var_get('MM_LCDPROC_KERNEL_MODULE');
+ },
+ extra => sub
+ {
+ my $minimyth = shift;
+ my $name = shift;
+
+ # Create a modprobe configuration file with the LCDproc kernel
module options.
+ my $kernel_module =
$minimyth->var_get('MM_LCDPROC_KERNEL_MODULE');
+ my $kernel_module_options =
$minimyth->var_get('MM_LCDPROC_KERNEL_MODULE_OPTIONS');
+ if (($kernel_module) && ($kernel_module_options))
+ {
+ my $modprobe_file
= "/etc/modprobe.d/init::conf::MM_LCDPROC.conf";
+ if ((open(FILE, '>', $modprobe_file)))
+ {
+ print FILE "# autogenerated by init::conf::MM_LCDPROC\n";
+ print FILE "options $kernel_module
$kernel_module_options\n";
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ return 1;
+ }
};
1;
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
Wed May 20 18:49:51 2009
@@ -74,6 +74,20 @@
return $value_auto;
},
value_none => '',
+ extra => sub
+ {
+ my $minimyth = shift;
+ my $name = shift;
+
+ my $device = $minimyth->var_get($name);
+ if (($device) && (! -e $device))
+ {
+ $minimyth->message_output('err', "Remote control
device '$device' specified by '$name' does not exist.");
+ return 0;
+ }
+
+ return 1;
+ },
};
$var_list{'MM_LIRC_KERNEL_MODULE'} =
{
@@ -168,7 +182,7 @@
};
$var_list{'MM_LIRC_DEVICE_LIST'} =
{
- prerequisite =>
['MM_LIRC_AUTO_ENABLED', 'MM_LIRC_DEVICE_BLACKLIST', 'MM_LIRC_DRIVER',
'MM_LIRC_FETCH_LIRCD_CONF'],
+ prerequisite =>
['MM_LIRC_AUTO_ENABLED', 'MM_LIRC_DEVICE_BLACKLIST', 'MM_LIRC_DEVICE',
'MM_LIRC_FETCH_LIRCD_CONF'],
value_default => 'auto',
value_valid => 'auto|.+',
value_auto => sub
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/lcdproc.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/lcdproc.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/lcdproc.pm
Wed May 20 18:49:51 2009
@@ -19,27 +19,8 @@
# Only start the LCDd daemon when one is not running already.
if (! $minimyth->application_running('LCDd'))
{
- my $device =
$minimyth->var_get('MM_LCDPROC_DEVICE');
- my $driver =
$minimyth->var_get('MM_LCDPROC_DRIVER');
- my $kernel_module =
$minimyth->var_get('MM_LCDPROC_KERNEL_MODULE');
- my $kernel_module_options =
$minimyth->var_get('MM_LCDPROC_KERNEL_MODULE_OPTIONS');
-
- # Load user configured kernel module.
- if ($kernel_module)
- {
- system(qq(/sbin/modprobe $kernel_module
$kernel_module_options));
- # Wait up to 60 seconds for the device to appear in the device
file system.
- for (my $delay = 0 ; ($delay < 60) && (! -e $device) ;
$delay++)
- {
- $minimyth->message_output('info', "waiting for LCD/VFD
device ($delay seconds) ...");
- sleep 1;
- }
- if (! -e $device)
- {
- $minimyth->message_output('err', "timed out waiting for
LCD/VFD device.");
- return 0;
- }
- }
+ my $driver = $minimyth->var_get('MM_LCDPROC_DRIVER');
+ my $device = $minimyth->var_get('MM_LCDPROC_DEVICE');
# Load the LCDproc configuration file.
if (! -e '/etc/LCDd.conf')
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---