DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-09-19 14:49:39

superkikim
Member
Registered: 2008-09-17
Posts: 8

Fonz Fun Plug and /ffp/start

Hi Fonz,

I suggest you make a new FFP dedicated forum. As now, your FFP is widely used on other NAS :-) Would be nice.

My question is:

I have managed to install FFP and Squeezecenter on a Zyxel NSA-220. Everything works perfectly fine, except that Squeezecenter doesn't start at boot.

I have created a slimserver.sh script and put it in /ffp/start and obviously changed permission. The script works just find. Start, stop, status and restart work fine.

Here is the script content:

Code:

#!/ffp/bin/sh

# PROVIDES: squeezecenter
# REQUIRES: mysqld.sh

. /ffp/etc/ffp.subr

name="slimserver"
command="/slimserver/slimserver"
slimserver_flags="--daemon --prefsfile /slimserver/prefs/server.prefs --user=squeezecenter --pidfile /var/run/slimserver.pid"

start_cmd="slimserver_start"
stop_cmd="slimserver_stop"
status_cmd="slimserver_status"

slimserver_start()
{
proc_start $command
}

slimserver_stop()
{
proc_stop slimserver
}

slimserver_status()
{
proc_status slimserver
}

run_rc_command "$1"

Is there any reason why it is not run at startup ?

Offline

 

#2 2008-09-19 14:58:43

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Fonz Fun Plug and /ffp/start

On the dns-323 there's a log file written (ffp.log). If there's a log file on your box, please post the relevant parts. Also, check output of 'rcorder /ffp/start/*.sh' to check that mysql and slimserver are started in the correct order. In any case, you should try to capture messages during system boot (redirect output of /ffp/etc/rc to some log file).

Offline

 

#3 2008-09-19 15:23:41

superkikim
Member
Registered: 2008-09-17
Posts: 8

Re: Fonz Fun Plug and /ffp/start

Where is supposed to be the ffp.log file ?

and where can I check the startup order ? Is there any script where it is set ?

Cheers

Offline

 

#4 2008-09-19 15:44:26

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Fonz Fun Plug and /ffp/start

superkikim wrote:

Where is supposed to be the ffp.log file ?

Don't know where it is on your device. You need to check Myzelf's scripts.

superkikim wrote:

and where can I check the startup order ? Is there any script where it is set ?

As I said:

Code:

rcorder /ffp/start/*.sh

Offline

 

#5 2008-09-19 17:03:10

superkikim
Member
Registered: 2008-09-17
Posts: 8

Re: Fonz Fun Plug and /ffp/start

Sorry. rcorder was not working, 'cause I made a mistake with the tmp folder. I had to reboot to have it working.

Error was:

Code:

# PROVIDES: squeezecenter
# REQUIRES: mysqld.sh

must be:

Code:

# PROVIDE: squeezecenter
# REQUIRE: mysqld

Cheers

Offline

 

#6 2008-09-19 17:08:12

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Fonz Fun Plug and /ffp/start

Where is supposed to be the ffp.log file ?

It's in /dev/null. You'll have to edit /after_booting.sh. Change line
/sbin/chroot /mnt/usbstick /ffp/etc/rc >>/dev/null
to
/sbin/chroot /mnt/usbstick /ffp/etc/rc >>./ffp.log 2>&1
That should write to (chrooted) /ffp.log

Offline

 

#7 2008-09-19 17:13:31

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Fonz Fun Plug and /ffp/start

superkikim wrote:

Error was:

So, does it start now automatically on boot?

Offline

 

#8 2008-09-19 17:19:16

superkikim
Member
Registered: 2008-09-17
Posts: 8

Re: Fonz Fun Plug and /ffp/start

fonz wrote:

So, does it start now automatically on boot?

Absolutely :-D

Tx for FFP by the way :-D Very helpful.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB