Author: pebender
Date: Sat Jan 24 15:56:24 2009
New Revision: 4319
Modified:
trunk/gar-minimyth/html/minimyth/document-changelog.txt
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_DHCP.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_EXTERNAL.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_FONT.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_GAME.pm
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_MEDIA.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_THEME.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_X.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/rc.pl
trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums
trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
Log:
- Changed perl init scripts so that they use return values rather than
the /var/log/minimyth.err.log file to trigger failure.
- Changed perl init scripts so that they do not create
/var/log/minimyth.err.log.
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 Sat Jan 24
15:56:24 2009
@@ -1,7 +1,7 @@
MiniMyth Changelog
--------------------------------------------------------------------------------
-Changes since 63 (2009-01-23):
+Changes since 63 (2009-01-24):
Current MythTV versions
MythTV 0.20-softpad: version 0.20.2.softpad, release-0-20-fixes branch
svn 16082,
@@ -106,6 +106,10 @@
the unionfs union.
- Changed http gets and puts so that they follow redirects as they did
before switching from using wget to using curl.
+ - Changed perl init scripts so that they use return values rather than
+ the /var/log/minimyth.err.log file to trigger failure.
+ - Changed perl init scripts so that they do not create
+ /var/log/minimyth.err.log.
Modified udev
- Renamed 06-minimyth-mythtv.rules to 07-minimyth-mythtv.rules.
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf.pm
Sat Jan 24 15:56:24 2009
@@ -28,7 +28,11 @@
$minimyth->message_output('info', "fetching configuration file ...");
# Determine current boot directory location.
- $self->_run($minimyth, 'MM_MINIMYTH_BOOT_URL');
+ if (! $self->_run($minimyth, 'MM_MINIMYTH_BOOT_URL'))
+ {
+ $minimyth->message_output('err', "cannot
determine 'MM_MINIMYTH_BOOT_URL'.");
+ return 0;
+ }
# Using local configuration files, so there should be a '/minimyth'
directory.
if ($minimyth->var_get('MM_MINIMYTH_BOOT_URL') eq 'file:/minimyth/')
@@ -55,6 +59,8 @@
return 0;
}
+ my $success = 1;
+
# Save the current boot directory location so that it is available to
the
# 'mm_minimyth_conf_include shell' shell function that might be called
from
# within '/etc/minimyth.d/minimyth.conf' when it is read.
@@ -75,13 +81,14 @@
if ($minimyth->var_exists($_))
{
$minimyth->message_output('err', "'minimyth.conf' is out
of date. '$_' is obsolete.");
+ $success = 0;
}
}
close(FILE);
}
# Fetch and run 'minimyth.pm'.
- $self->_run($minimyth, 'MM_MINIMYTH_FETCH_MINIMYTH_PM');
+ $self->_run($minimyth, 'MM_MINIMYTH_FETCH_MINIMYTH_PM') || ($success =
0);
if ($minimyth->var_get('MM_MINIMYTH_FETCH_MINIMYTH_PM') eq 'yes')
{
$minimyth->message_output('info', "fetching configuration
package ...");
@@ -90,6 +97,7 @@
if (! -e '/etc/minimyth.d/minimyth.pm')
{
$minimyth->message_output('err', "failed to
fetch 'minimyth.pm' file.");
+ $success = 0;
}
}
if (-f '/etc/minimyth.d/minimyth.pm')
@@ -110,11 +118,12 @@
$minimyth->message_output('info', "running configuration
package ...");
eval
{
- init::minimyth->start($minimyth);
+ init::minimyth->start($minimyth) || ($success = 0);
};
if ($@)
{
$minimyth->message_output('err', qq($@));
+ $success = 0;
}
}
}
@@ -135,7 +144,7 @@
# Process the DHCP override configuration variables
# so that they are available to the DHCP client.
- $self->_run($minimyth, 'MM_DHCP_.*');
+ $self->_run($minimyth, 'MM_DHCP_.*') || ($success = 0);
$minimyth->var_save({ 'file' => '/etc/conf.d/dhcp.override', 'filter'
=> 'MM_DHCP_.*' });
# Start the DHCP client now that we have created the DHCP override
variables file.
@@ -144,38 +153,22 @@
{
eval
{
- init::dhcp->start($minimyth);
+ init::dhcp->start($minimyth) || ($success = 0);
};
if ($@)
{
$minimyth->message_output('err', qq($@));
+ $success = 0;
}
}
$minimyth->message_output('info', "processing configuration file ...");
$minimyth->var_clear();
$minimyth->var_load({ 'file' => '/etc/minimyth.d/minimyth.conf' });
- $self->_run($minimyth);
+ $self->_run($minimyth) || ($success = 0);
$minimyth->var_save();
- # If there are any errors, then do not continue
- if ((-e '/var/log/minimyth.err.log') &&
(open(FILE, '<', '/var/log/minimyth.err.log')))
- {
- my $conf_error = 0;
- while (<FILE>)
- {
- $conf_error = 1;
- last;
- }
- close(FILE);
- if ($conf_error != 0)
- {
-
$minimyth->message_output('err', "check '/var/log/minimyth.err.log' for
further details.");
- return 0;
- }
- }
-
- return 1;
+ return $success;
}
sub stop
@@ -212,6 +205,8 @@
my $minimyth = shift;
my $filter = shift || 'MM_.*';
+ my $success = 1;
+
my %var_list;
# Get the variable handlers from each of the variable group packages
in the MM directory,
@@ -236,7 +231,8 @@
if ($@)
{
$minimyth->message_output('err', qq($@));
- return 0;
+ $success = 0;
+ return $success;
}
foreach (grep( /^$filter$/, keys %{$group_var_list}))
{
@@ -259,10 +255,10 @@
# Run the variable initialization handlers for each variable.
foreach (keys %var_list)
{
- $self->_run_var($minimyth, \%var_list, $_);
+ $self->_run_var($minimyth, \%var_list, $_) || ($success = 0);
}
- return 1;
+ return $success;
}
sub _run_var
@@ -285,10 +281,12 @@
my $file = $var->{'file'};
my $extra = $var->{'extra'};
+ my $success = 1;
+
# Check whether or not it has been processed.
if (($var->{'complete'}) && ($var->{'complete'} == 1))
{
- return 1;
+ return $success;
}
# Process prerequisites.
@@ -304,7 +302,8 @@
if ($@)
{
$minimyth->message_output('err', qq($@));
- return 0;
+ $success = 0;
+ return $success;
}
}
# Convert non-array pointer (i.e. scaler) to an array pointer.
@@ -318,7 +317,7 @@
my $filter = $_;
foreach (grep(/^$filter$/, (keys %{$var_list})))
{
- $self->_run_var($minimyth, $var_list, $_);
+ $self->_run_var($minimyth, $var_list, $_) || ($success =
0);
}
}
}
@@ -332,7 +331,7 @@
# Clean value.
if (defined $value_clean)
{
- &{$value_clean}($minimyth, $var_name);
+ &{$value_clean}($minimyth, $var_name) || ($success = 0);
}
# Process default value.
@@ -350,7 +349,8 @@
if ($@)
{
$minimyth->message_output('err', qq($@));
- return 0;
+ $success = 0;
+ return $success;
}
}
# Set variable to its default value.
@@ -371,7 +371,8 @@
if ($@)
{
$minimyth->message_output('err', qq($@));
- return 0;
+ $success = 0;
+ return $success;
}
}
# Convert non-array pointer (i.e. scaler) to an array pointer.
@@ -391,6 +392,7 @@
if ($valid == 0)
{
$minimyth->message_output('err', qq($var_name=') .
$minimyth->var_get($var_name) . qq(' is not valid.));
+ $success = 0;
# Replace the invalid value with the default value,
# so that dependent variables will get a valid value.
@@ -409,7 +411,8 @@
if ($@)
{
$minimyth->message_output('err', qq($@));
- return 0;
+ $success = 0;
+ return $success;
}
}
# Set variable to its default value.
@@ -432,7 +435,8 @@
if ($@)
{
$minimyth->message_output('err', qq($@));
- return 0;
+ $success = 0;
+ return $success;
}
}
# Convert non-array pointer (i.e. scaler) to an array pointer.
@@ -452,6 +456,7 @@
if ($obsolete == 1)
{
$minimyth->message_output('err', qq('minimyth.conf' is out of
date. $var_name=') . $minimyth->var_get($var_name) . qq(' is obsolete.));
+ $success = 0;
}
}
@@ -468,7 +473,8 @@
if ($@)
{
$minimyth->message_output('err', qq($@));
- return 0;
+ $success = 0;
+ return $success;
}
}
# Set variable to its auto value.
@@ -488,7 +494,8 @@
if ($@)
{
$minimyth->message_output('err', qq($@));
- return 0;
+ $success = 0;
+ return $success;
}
}
# Set variable to its none value.
@@ -508,7 +515,8 @@
if ($@)
{
$minimyth->message_output('err', qq($@));
- return 0;
+ $success = 0;
+ return $success;
}
}
if (ref($file) eq 'CODE')
@@ -520,7 +528,8 @@
if ($@)
{
$minimyth->message_output('err', qq($@));
- return 0;
+ $success = 0;
+ return $success;
}
}
# Convert non-array pointer (i.e. hash pointer) to an array
pointer.
@@ -540,6 +549,7 @@
if (! -e $name_local)
{
$minimyth->message_output('err', qq(failed to fetch
MiniMyth read-only configuration file ') . $name_remote . qq('));
+ $success = 0;
}
else
{
@@ -555,12 +565,12 @@
# Run extra sub-routine.
if (defined $extra)
{
- &{$extra}($minimyth, $var_name);
+ &{$extra}($minimyth, $var_name) || ($success = 0);
}
$var->{'complete'} = 1;
- return 1;
+ return $success;
}
1;
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_DHCP.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_DHCP.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_DHCP.pm
Sat Jan 24 15:56:24 2009
@@ -20,6 +20,7 @@
my $minimyth = shift;
my $name = shift;
+ my $success = 1;
# If the DCHP override file exists, then DHCP should be completely
configured.
if (-e '/etc/conf.d/dhcp.override')
{
@@ -27,8 +28,10 @@
if (! $hostname)
{
$minimyth->message_output('err', qq('Host Name'
(or 'MM_DHCP_HOST_NAME') not configured.));
+ $success = 0;
}
}
+ return $success;
}
};
$var_list{'MM_DHCP_DOMAIN_NAME'} =
@@ -41,14 +44,17 @@
my $minimyth = shift;
my $name = shift;
+ my $success = 1;
# If the DCHP override file exists, then DHCP should be completely
configured.
if (-e '/etc/conf.d/dhcp.override')
{
if (! -e '/etc/localtime')
{
$minimyth->message_output('err', qq('TCode'
(or 'MM_DHCP_TCODE') not configured.));
+ $success = 0;
}
}
+ return $success;
}
};
$var_list{'MM_DHCP_DOMAIN_NAME_SERVERS'} =
@@ -58,6 +64,7 @@
my $minimyth = shift;
my $name = shift;
+ my $success = 1;
# If the DCHP override file exists, then DHCP should be completely
configured.
if (-e '/etc/conf.d/dhcp.override')
{
@@ -74,8 +81,10 @@
if ($valid == 0)
{
$minimyth->message_output('err', qq('Domain Name Servers'
(or 'MM_DHCP_DOMAIN_NAME_SERVERS') not configured.));
+ $success = 0;
}
}
+ return $success;
}
};
$var_list{'MM_DHCP_NTP_SERVERS'} =
@@ -85,6 +94,7 @@
my $minimyth = shift;
my $name = shift;
+ my $success = 1;
# If the DCHP override file exists, then DHCP should be completely
configured.
if (-e '/etc/conf.d/dhcp.override')
{
@@ -101,8 +111,10 @@
if ($valid == 0)
{
$minimyth->message_output('err', qq('NTP Servers'
(or 'MM_DHCP_NTP_SERVERS') not configured.));
+ $success = 0;
}
}
+ return $success;
}
};
$var_list{'MM_DHCP_LOG_SERVERS'} =
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_EXTERNAL.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_EXTERNAL.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_EXTERNAL.pm
Sat Jan 24 15:56:24 2009
@@ -29,14 +29,18 @@
{
my $minimyth = shift;
+ my $success = 1;
if (( $minimyth->var_get('MM_EXTERNAL_VOLUME_UP')) && (!
$minimyth->var_get('MM_EXTERNAL_VOLUME_DOWN')))
{
$minimyth->message_output('err', "MM_EXTERNAL_VOLUME_UP is set
but MM_EXTERNAL_VOLUME_DOWN is not set.");
+ $success = 0
}
if ((! $minimyth->var_get('MM_EXTERNAL_VOLUME_UP')) && (
$minimyth->var_get('MM_EXTERNAL_VOLUME_DOWN')))
{
$minimyth->message_output('err', "MM_EXTERNAL_VOLUME_UP is not
set but MM_EXTERNAL_VOLUME_DOWN is set.");
+ $success = 0
}
+ return $success;
}
};
$var_list{'MM_EXTERNAL_VOLUME_MUTE'} =
@@ -46,22 +50,28 @@
{
my $minimyth = shift;
+ my $success = 1;
if (( $minimyth->var_get('MM_EXTERNAL_VOLUME_MUTE')) && (!
$minimyth->var_get('MM_EXTERNAL_VOLUME_DOWN')))
{
$minimyth->message_output('err', "MM_EXTERNAL_VOLUME_MUTE is
set but MM_EXTERNAL_VOLUME_DOWN is not set.");
+ $success = 0
}
if (( $minimyth->var_get('MM_EXTERNAL_VOLUME_MUTE')) && (!
$minimyth->var_get('MM_EXTERNAL_VOLUME_UP' )))
{
$minimyth->message_output('err', "MM_EXTERNAL_VOLUME_MUTE is
set but MM_EXTERNAL_VOLUME_UP is not set.");
+ $success = 0
}
if ((! $minimyth->var_get('MM_EXTERNAL_VOLUME_MUTE')) && (
$minimyth->var_get('MM_EXTERNAL_VOLUME_DOWN')))
{
$minimyth->message_output('err', "MM_EXTERNAL_VOLUME_MUTE is
not set but MM_EXTERNAL_VOLUME_DOWN is set.");
+ $success = 0
}
if ((! $minimyth->var_get('MM_EXTERNAL_VOLUME_MUTE')) && (
$minimyth->var_get('MM_EXTERNAL_VOLUME_UP' )))
{
$minimyth->message_output('err', "MM_EXTERNAL_VOLUME_MUTE is
not set but MM_EXTERNAL_VOLUME_UP is set.");
+ $success = 0
}
+ return $success;
}
};
$var_list{'MM_EXTERNAL_VOLUME_ENABLED'} =
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_FONT.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_FONT.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_FONT.pm
Sat Jan 24 15:56:24 2009
@@ -33,6 +33,8 @@
closedir(DIR);
}
}
+
+ return 1;
}
};
$var_list{'MM_FONT_FILE_TTF_ADD'} =
@@ -50,6 +52,8 @@
$value_clean =~ s/^ //;
$value_clean =~ s/ $//;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => '',
value_file => '.+',
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_GAME.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_GAME.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_GAME.pm
Sat Jan 24 15:56:24 2009
@@ -32,6 +32,8 @@
$value_clean =~ s/^://;
$value_clean =~ s/:$//;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => '.fceultra' .
':' . '.jzintv' .
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
Sat Jan 24 15:56:24 2009
@@ -84,6 +84,8 @@
}
$minimyth->var_set($name, join(' ', @kernel_modules));
+
+ return 1;
}
};
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
Sat Jan 24 15:56:24 2009
@@ -31,6 +31,8 @@
$minimyth->var_set('MM_LCDPROC_DRIVER', $driver);
$minimyth->var_set('MM_LCDPROC_DEVICE', $device);
}
+
+ return 1;
}
};
$var_list{'MM_LCDPROC_DEVICE'} =
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_MEDIA.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_MEDIA.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_MEDIA.pm
Sat Jan 24 15:56:24 2009
@@ -22,6 +22,8 @@
$value_clean =~ s/^ //g;
$value_clean =~ s/ $//g;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
};
my %var_list;
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_THEME.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_THEME.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_THEME.pm
Sat Jan 24 15:56:24 2009
@@ -33,10 +33,13 @@
my $minimyth = shift;
my $name = shift;
+ my $success = 1;
if ($minimyth->var_get($name) eq 'G.A.N.T.')
{
$minimyth->message_output('err', "theme 'G.A.N.T.' has been
renamed to 'G.A.N.T'. Please update '$name'.");
+ $success = 0;
}
+ return $success;
}
};
$var_list{'MM_THEME_URL'} =
@@ -165,6 +168,8 @@
$value_clean =~ s/^ //;
$value_clean =~ s/ $//;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => '',
value_file => '.+',
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_X.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_X.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_X.pm
Sat Jan 24 15:56:24 2009
@@ -129,6 +129,7 @@
my $minimyth = shift;
my $name = shift;
+ my $success = 1;
if (($minimyth->var_get('MM_X_OUTPUT_DVI') eq 'none') &&
($minimyth->var_get('MM_X_OUTPUT_VGA') eq 'none') &&
($minimyth->var_get('MM_X_OUTPUT_TV') eq 'none'))
@@ -142,16 +143,19 @@
(! $minimyth->var_get('MM_X_OUTPUT_VGA') eq 'none'))
{
$minimyth->message_output('err', qq('MM_X_OUTPUT_DVI'
and 'MM_X_OUTPUT_VGA' are both enabled.));
+ $success = 0;
}
if ((! $minimyth->var_get('MM_X_OUTPUT_DVI') eq 'none') &&
(! $minimyth->var_get('MM_X_OUTPUT_TV') eq 'none'))
{
$minimyth->message_output('err', qq('MM_X_OUTPUT_DVI'
and 'MM_X_OUTPUT_TV' are both enabled.));
+ $success = 0;
}
if ((! $minimyth->var_get('MM_X_OUTPUT_VGA') eq 'none') &&
(! $minimyth->var_get('MM_X_OUTPUT_TV') eq 'none'))
{
$minimyth->message_output('err', qq('MM_X_OUTPUT_VGA'
and 'MM_X_OUTPUT_TV' are both enabled.));
+ $success = 0;
}
}
if ($minimyth->var_get('MM_X_DRIVER') eq 'openchrome')
@@ -161,8 +165,10 @@
(! $minimyth->var_get('MM_X_OUTPUT_TV') eq 'none'))
{
$minimyth->message_output('err', qq('MM_X_OUTPUT_DVI'
and 'MM_X_OUTPUT_TV' are both enabled.));
+ $success = 0;
}
}
+ return $success;
}
};
#===============================================================================
@@ -195,6 +201,8 @@
$value = 'HorizSync ' . $value;
$minimyth->var_set($name, $value);
+
+ return 1;
}
};
$var_list{'MM_X_REFRESH'} =
@@ -290,6 +298,8 @@
$value = 'VertRefresh ' . $value;
$minimyth->var_set($name, $value);
+
+ return 1;
}
};
$var_list{'MM_X_RESOLUTION'} =
@@ -302,6 +312,8 @@
my $value_clean = $minimyth->var_get($name);
$value_clean =~ s/^([0-9]+)[Xx]([0-9]+)$/$1x$2/;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => 'none',
value_valid => 'none|[0-9]+x[0-9]+',
@@ -319,6 +331,8 @@
$value_clean =~ s/ +/ /g;
$value_clean =~
s/^[Mm][Oo][Dd][Ee][Ll][Ii][Nn][Ee] "([0-9]+)[Xx]([0-9]+)([^"]*)"
(.*)$/Modeline "$1x$2$3" $4/;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => 'auto',
value_valid => sub
@@ -390,6 +404,8 @@
$value_clean =~ s/ $//;
$value_clean =~
s/^[Mm][Oo][Dd][Ee][Ll][Ii][Nn][Ee] "([0-9]+)[Xx]([0-9]+)([^"]*)"
(.*)$/Modeline "$1x$2$3" $4/;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => 'none',
value_valid => 'none|Modeline "[0-9]+[Xx][0-9]+[^"]*" .*',
@@ -408,6 +424,8 @@
$value_clean =~ s/ $//;
$value_clean =~
s/^[Mm][Oo][Dd][Ee][Ll][Ii][Nn][Ee] "([0-9]+)[Xx]([0-9]+)([^"]*)"
(.*)$/Modeline "$1x$2$3" $4/;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => 'none',
value_valid => 'none|Modeline "[0-9]+[Xx][0-9]+[^"]*" .*',
@@ -426,6 +444,8 @@
$value_clean =~ s/ $//;
$value_clean =~
s/^[Mm][Oo][Dd][Ee][Ll][Ii][Nn][Ee] "([0-9]+)[Xx]([0-9]+)([^"]*)"
(.*)$/Modeline "$1x$2$3" $4/;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => 'none',
value_valid => 'none|Modeline "[0-9]+[Xx][0-9]+[^"]*" .*',
@@ -442,6 +462,8 @@
my $value_clean = $minimyth->var_get($name);
$value_clean =~ s/^([0-9]+)[Xx]([0-9]+)(.*)$/$1x$2$3/;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => 'auto',
value_valid => sub
@@ -584,6 +606,8 @@
my $value_clean = $minimyth->var_get($name);
$value_clean =~ s/^([0-9]+)[Xx]([0-9]+)(.*)$/$1x$2$3/;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => 'auto',
value_valid => 'auto|none|[0-9]+[Xx][0-9]+.*',
@@ -641,6 +665,8 @@
my $value_clean = $minimyth->var_get($name);
$value_clean =~ s/^([0-9]+)[Xx]([0-9]+)(.*)$/$1x$2$3/;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => 'auto',
value_valid => 'auto|none|[0-9]+[Xx][0-9]+.*',
@@ -698,6 +724,8 @@
my $value_clean = $minimyth->var_get($name);
$value_clean =~ s/^([0-9]+)[Xx]([0-9]+)(.*)$/$1x$2$3/;
$minimyth->var_set($name, $value_clean);
+
+ return 1;
},
value_default => 'auto',
value_valid => 'auto|none|[0-9]+[Xx][0-9]+.*',
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/rc.pl
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/rc.pl
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/rc.pl
Sat Jan 24 15:56:24 2009
@@ -119,6 +119,8 @@
}
if ($fail)
{
+ $minimyth->message_output('info', "init failed.
check '/var/log/messages' for further details.");
+
# An error occured, so start a virtual console login and a telnet
login.
# This is a serious security hole, but users have difficulty
debugging
# when they cannot connect.
Modified: trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums
==============================================================================
--- trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums (original)
+++ trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums Sat Jan 24
15:56:24 2009
@@ -1 +1 @@
-b3c915170eba38146b0b659bf8ccf615 download/MiniMyth.pm
+ca8e5b0eeb51f0d1ab3c0433a604b040 download/MiniMyth.pm
Modified: trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
==============================================================================
--- trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
(original)
+++ trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm Sat Jan
24 15:56:24 2009
@@ -171,39 +171,25 @@
if ($self->splash_running_test)
{
system(qq(/usr/bin/logger -t minimyth -p
local0.$level "$message"));
- if ($level eq 'err') { $self->splash_message_output(qq(error:
$message)); }
- elsif ($level eq 'warn') {
$self->splash_message_output(qq(warning: $message)); }
- else {
$self->splash_message_output(qq($message)); }
- }
- else
- {
- system(qq(/usr/bin/logger -s -t minimyth -p
local0.$level "$message"));
- }
- if (($level eq 'err') || ($level eq 'warn'))
- {
- my $log_file = "/var/log/minimyth.$level.log";
- if (! -e $log_file)
+ if ($level eq 'err')
+ {
+ $self->splash_message_output(qq(error: $message));
+ $self->splash_command(qq(log $message));
+ }
+ elsif ($level eq 'warn')
{
- my $log_dir = File::Basename::dirname($log_file);
- if (! -e $log_dir)
- {
- File::Path::mkpath($log_dir);
- }
- if (-w $log_dir)
- {
- open(FILE, '>', $log_file);
- chmod(0666, $log_file);
- close(FILE);
- }
+ $self->splash_message_output(qq(warning: $message));
+ $self->splash_command(qq(log $message));
}
- if (-e $log_file)
+ else
{
- open(FILE, '>>', $log_file);
- print FILE $message . "\n";
- close(FILE);
+ $self->splash_message_output(qq($message));
}
- $self->splash_command(qq(log $message));
+ }
+ else
+ {
+ system(qq(/usr/bin/logger -s -t minimyth -p
local0.$level "$message"));
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---