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 2009-02-18 14:58:03

breasthead
Member
Registered: 2009-02-05
Posts: 38

whats wrong with this script?

Hi,

I'm new to the ffp and the dlink, but from what I understand scripts in the /ffp/start directory with execute permissions are executed on system start.

This script I've written (attached) to mount a USB HDD doesn't auto execute, BUT i can ssh into the box and run the script manually via
# /ffp/start/mount_USB_drives.sh

Why doesn't it just happen on start-up ... what have I forgotten?

Its located in /ffp/start (obviously)
owner: root
permissions: -rwxr-xr-x


Cheers for any help

PS I know its not the best script and has too much logging tongue

Last edited by breasthead (2009-02-18 14:58:59)


Attachments:
Attachment Icon mount_USB_drives.sh, Size: 2,071 bytes, Downloads: 178

Offline

 

#2 2009-02-19 02:28:14

rcblackwell
Member
From: Pickering, ON
Registered: 2008-05-19
Posts: 204
Website

Re: whats wrong with this script?

breasthead wrote:

Why doesn't it just happen on start-up ... what have I forgotten?

Its located in /ffp/start (obviously)
owner: root
permissions: -rwxr-xr-x

I see your using #!/bin/sh.

Have you tried #!/ffp/bin/sh.


Bob Blackwell
Pickering, ON

Offline

 

#3 2009-02-19 10:19:27

breasthead
Member
Registered: 2009-02-05
Posts: 38

Re: whats wrong with this script?

Ok, after a little more investigation, it does run on start-up, but still doesn't work ... The only thing I can think of is that the usb kernal that needs to be loaded, isn't finished loading before the script is run.

I have it setup so the kernals are loaded in /ffp/etc/fun_plug.local

I'm guessing that my mount script in /ffp/start is loaded before the fun_plug.local ?


I'll play around with moving the insmod commands to see if I can find the best place for them


Cheers for reading
B

Offline

 

#4 2009-02-19 11:38:45

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

Re: whats wrong with this script?

What's 'wait 15' supposed to do? Did you mean 'sleep 15'?

Offline

 

#5 2009-02-20 15:42:25

breasthead
Member
Registered: 2009-02-05
Posts: 38

Re: whats wrong with this script?

fonz wrote:

What's 'wait 15' supposed to do? Did you mean 'sleep 15'?

Yeah, I already fixed that

Does anyone know how you can tell if the usb-storage.ko is finished loading?

Offline

 

#6 2009-02-20 17:10:12

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

Re: whats wrong with this script?

breasthead wrote:

Does anyone know how you can tell if the usb-storage.ko is finished loading?

usb-storage.ko loads immediately, you're waiting for the disk to become accessible. Look here for a script that polls /proc/partitions:
http://dns323.kood.org/forum/p3521-2007 … html#p3521

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB