GP2X Autostarting The Samba Client


Pickle

Mega GP Mania
Joined
May 30, 2006
Messages
5,518
Location
Detroit, Michigan
Website
Visit site
Im wondering if there is an interest in starting the client whenever the GP2X is turned on?

I have a little linux background and I believe that this can be done by adding the correct script to the runlevel desired.
Now the part where im stuck is how to write the script. (Note if we can get the client to run I think we can then auto mount the shares in fstab file).
 
Can you not just add 'smbfs' to /etc/modules to autoload the smbfs module and a line to fstab to mount the share?

Doing some googling it looks like you are correct, when I said i knew a little about linux, i really meant little, but im in this to learn.

Im going to try this in a couple hours.
 
Last edited by a moderator:
Im going to try this in a couple hours.

Here's a line from an fstab on one of my x86 boxes, it might help you out (all one line).
//machine_name/Share /mnt/share smbfs credentials=/etc/creds 0 0

(Add machine_name and the ip address to /etc/hosts)

and in /etc/creds (two lines):
username=myusername
password=mypassword

(As an aside, I can't get the smbfs module on the GP2X to talk to my machines here.. I think that I may need a cifs module instead as I run a W2k3 domain).
 
Last edited by a moderator:
I have seen the format for the fstab and the idea to create a credintial file, but its good for anyone that hasnt.

ok i added "smbfs" to the etc/modules, but its not starting?
Did I do something wrong? (Also tried moving smbfs.o around, like to lib/modules, didnt effect a thing)

any ideas?

Edit #1, If one has a serial cable output could they see messages as Linux loads and possibly see why this doesnt work?
 
Last edited by a moderator:
So do you need to add "insmod smbfs" to rc.sysinit and add whatever line it is to fstab plus add username and password to etc/creds? Why is the username/password in etc/creds instead of on the command line in fstab?

Will it silently fail and continue on if the GP2X is not connected to the PC?

What is rc.sysinit? What is fstab? Why are they have such silly names?
 
So do you need to add "insmod smbfs" to rc.sysinit and add whatever line it is to fstab plus add username and password to etc/creds? Why is the username/password in etc/creds instead of on the command line in fstab?
Paranoia. The fstab file is world-readable, which is a really bad place for a login/password. If you put it in a file you can lock down that file so that only root can read it. Ok so on a GP2X it doesn't matter all that much, but security is a decent habit to get into, IMHO.

Will it silently fail and continue on if the GP2X is not connected to the PC?
Yeah. It would depend on your fstab line as to how long it would wait before it failed (and if it waited at all).

What is rc.sysinit? What is fstab? Why are they have such silly names?
It's linux. Google 'em.
 
Last edited by a moderator:
So do you need to add "insmod smbfs" to rc.sysinit and add whatever line it is to fstab plus add username and password to etc/creds? Why is the username/password in etc/creds instead of on the command line in fstab?

Will it silently fail and continue on if the GP2X is not connected to the PC?

What is rc.sysinit? What is fstab? Why are they have such silly names?

Currently I am still mounting the share by command line, all I have right now is a way to start the client.
 
Last edited by a moderator:
Back
Top