Deprecated minimyth.script under 60b3 doesnt work at all?

Help with booting MiniMyth

Moderator: Pablo

Post Reply
emlsnws
Contributor
Posts: 52
Joined: Wed Sep 03, 2008 9:13 am
Location: Gloucestershire, UK

Deprecated minimyth.script under 60b3 doesnt work at all?

Post by emlsnws » Wed Nov 12, 2008 1:07 pm

I have just built test build 60b3 locally, it boots and operates apparently fine, but I have a problem with my minimyth.script file.

I have previously got a minimyth.script (in shell language) to work on earlier build (17450 vintage built with 58 system IIRC), which mounts some additional directories for posters and roms.

It is quite a simple file:

Code: Select all

# Include the MiniMyth configuration variables and functions.
. /etc/rc.d/functions

# Mount the posters directory
mkdir /mnt/posters
mount -o nolock 192.168.1.8:/storage/posters /mnt/posters

# Mount the roms directory
mkdir -p /storage/roms
mount -o nolock 192.168.1.8:/storage/roms /storage/roms

I am using compact flash boot. In the build 60 case, I have added MM_INIT_TYPE=sh on the boot line in syslinux.cfg:

Code: Select all

DEFAULT minimyth

LABEL minimyth
        KERNEL kernel
        APPEND ro root=/dev/ram0 MM_INIT_TYPE=sh MM_DEBUG=yes ramdisk_size=96000 initrd=rootfs

None of the results of the minimyth.script can be seen (no mounted directories) but I see a note in /var/log/messages at the time minimyth.script is executed:

Code: Select all

Nov 12 08:15:49 (none) local0.info minimyth: 'file:/minimyth/conf/default/minimyth.script' downloaded.
Nov 12 08:15:49 (none) local0.info minimyth: running minimyth.script ...
Nov 12 08:15:50 (none) local0.info minimyth: stopping DHCP client ...
Nov 12 08:15:50 (none) local0.info udhcpc[1136]: Received SIGTERM
Nov 12 08:15:50 (none) local0.info minimyth: starting DHCP client ...
Nov 12 08:15:50 (none) local0.info udhcpc[3164]: udhcpc (v1.12.1) started
Nov 12 08:15:50 (none) local0.info udhcpc[3164]: Sending discover...
My question is, if minimyth.script is executed before the machine has a DHCP reply, ie. an IP address, surely it will not be able to mount the nfs directories?
This worked ok on previous builds, my posters and roms directories were mounted fine - however I cannot provide a log snippet easily.

Here I try a perl script, minimyth.pm:

Code: Select all


#!/usr/bin/perl

package init::minimyth;

use strict;
use warnings;

require MiniMyth;

sub start
{
        my $self     = shift;
        my $minimyth = shift;

        $minimyth->url_mount('nfs://192.168.1.8/storage/roms, '/storage/roms');

        $minimyth->url_mount('nfs://192.168.1.8/mnt/posters, '/mnt/posters');

        return 1;
}
Once I set MM_FETCH_MINIMYTH_PM='yes' in minimyth.conf, and remove MM_INIT_TYPE=sh from the boot line, the Perl script above works perfectly - I see my mounted directories :-)

I realise shell scripts are now deprecated but thought it was worth pointing out that they may not work, at least with 60b3.

Thanks,
Simon.
[/i]
Last edited by emlsnws on Thu Nov 13, 2008 4:02 pm, edited 2 times in total.
Backend: AN7-Guru w/Athlon XP-M 2400+ running FC8 and Mythtv SVN 17450
Frontend1: EPIA M10000 running Minimyth pre-built
Frontend2: MSI K7N2 (MS-6777) Athlon running Minimyth 66b5, Antec Fusion Black, VGA to Scart PAL

emlsnws
Contributor
Posts: 52
Joined: Wed Sep 03, 2008 9:13 am
Location: Gloucestershire, UK

Post by emlsnws » Thu Nov 13, 2008 10:31 am

I have seen this again after using a perl script, that had its own problems, so I have returned to a shell script to avoid those problems and found it still does not execute (apparently).

In the minimyth.script, as well as the mounted drives I mention above, I have added a line to select my LCD type to 1.

After boot, I telnet in and look for evidence that the script has run (ie. check the type was set to 1). It was 0.

So I am pretty confident now that minimyth.script is not being executed (although the log messages say that it is) with 60b3. Not so sure its related to the timing relative to DHCP etc, it maybe just that the perl/sh choice doesn't handle sh scripts properly any more?

Thanks,
Simon.
[/i]
Backend: AN7-Guru w/Athlon XP-M 2400+ running FC8 and Mythtv SVN 17450
Frontend1: EPIA M10000 running Minimyth pre-built
Frontend2: MSI K7N2 (MS-6777) Athlon running Minimyth 66b5, Antec Fusion Black, VGA to Scart PAL

nietu
Member
Posts: 25
Joined: Sun Feb 18, 2007 10:42 am

Post by nietu » Fri Nov 14, 2008 8:38 pm

Change your . /etc/rc.d/functions -> . /etc/rc.d.sh/functions

then it works, at least for me

/Tommi

emlsnws
Contributor
Posts: 52
Joined: Wed Sep 03, 2008 9:13 am
Location: Gloucestershire, UK

Post by emlsnws » Fri Nov 14, 2008 10:56 pm

Tommi,

you have an excellent eye for detail.... I missed that one!

And now it works - Many thanks!

My LCD is now working from bootup in my case (Antec Fusion Black Remote with 15c2:0038 LCD) so I am very pleased :-)

For reference here is my minimyth.script :

Code: Select all

# Include the MiniMyth configuration variables and functions.
. /etc/rc.d.sh/functions

/bin/echo 1 > /sys/module/lirc_imon/parameters/is_lcd

# Mount the posters directory
mkdir /mnt/posters
mount -o nolock 192.168.1.8:/storage/posters /mnt/posters

# Mount the roms directory
mkdir -p /storage/roms
mount -o nolock 192.168.1.8:/storage/roms /storage/roms

I am using test build 60b3. The two mkdir/mount stanzas are not needed for the LCD to work, they are for my installation.

Many, many thanks. So pleased to get this working :-)

Simon
Backend: AN7-Guru w/Athlon XP-M 2400+ running FC8 and Mythtv SVN 17450
Frontend1: EPIA M10000 running Minimyth pre-built
Frontend2: MSI K7N2 (MS-6777) Athlon running Minimyth 66b5, Antec Fusion Black, VGA to Scart PAL

Post Reply