Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#34673 - 18/07/2001 13:56 ftp server with install script
smu
old hand

Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
Hi.

I compiled stupid-ftpd (http://stupid-ftpd.sourceforge.net/) for use on the empeg. This ftp-Daemon has two advantages when run on the empeg:
1. It does not need a meaningful /etc/passwd
2. It is small (only about 38k stripped)
My archive can be found at: http://www.incase.de/empeg/stupid-ftpd-empeg0.9beta.zip. As far as I could test it, it works as expected (the installation scripts and the daemon itself, that is), except for a minor peeve: It takes about 30 seconds for a filetransfer to start (only RETR command, not LIST or other transfers, maybe also effects STOR command, didn't test that one), and I can't find the reason for this. Maybe someone here would like to check this (the modified source is included in the zip file).
Please test the installation and the daemon itself, I already tested it as good as I could, but there are almost always things I miss.
I would be especially interested in comments on my installation scripts and the modified init script.
I am thinking of rewriting the init script in a way that checks /usr/local/startup-scripts for executable scripts and executes them before entering the player/bash-loop. This would make up for a single (and static) init script and multiple startup-scripts for each extra application that should run on an empeg. By that way, an init script installed with (say) an ftp server (guess which one) would not disable an already existing displayserver init script, but add to it.
(I already took care of displayserver in my script, but what with possible other extensions like a SMB server or something?). Opinions?


cu,
sven
proud MkII owner (12GB blue now green, #080000113)


Attachments
33885-stupid-ftpd-empeg0.9beta1smu.zip (67 downloads)

_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord

Top
#34674 - 18/07/2001 16:37 Re: ftp server with install script [Re: smu]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
I would be especially interested in comments on my installation scripts and the modified init script.
I am thinking of rewriting the init script in a way that checks /usr/local/startup-scripts for executable scripts and executes them before entering the player/bash-loop. This would make up for a single (and static) init script and multiple startup-scripts for each extra application that should run on an empeg. By that way, an init script installed with (say) an ftp server (guess which one) would not disable an already existing displayserver init script, but add to it.


Hmm, a simplified init.s/rc?.d/[KS]* stucture, right? Cool!

Actually, why not borrow from the concept of run levels some more? I mean, during boot we will probably want to start/configure a couple of things before entering a standard player/shell loop (most easily done by exec-ing the standard init). Now, when quitting the player we might want to do different things (I already have a small script called from /etc/profile that prompts me on display what to do next: play tetris, mount drives RW and drop to shell, return to player...) How about such a script which then switches to 'run level' of our choice (chosen via remote or serial terminal) executing appropriate K* stop and S* start scripts?

Now, this is easy enough for anybody to write for themselves, but let's agree on details, so that our resident magicians can write mutually compatible install scripts.


Dragi "Bonzi" Raos
Zagreb, Croatia
Q#5196, MkII#80000376, 18GB green
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#34675 - 18/07/2001 18:14 Re: ftp server with install script [Re: bonzi]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
I think all the empeg addon developers need to start a new thread to get this set up. It would definitly be useful to have a standard, with more and more utilities comming out. I have a few ideas right now, so I'll start.


Top
#34676 - 18/07/2001 21:55 Re: ftp server with install script [Re: smu]
cwillenbrock
enthusiast

Registered: 30/12/2000
Posts: 249
Loc: Dover, NJ
Did I miss something? I'm not a much of a hacker so let me know if I'm doing something wrong here...

I ran the FTPD install script which finishes okay, but upon reboot things don't seem right. I can't FTP to the empeg. It just drops me to a command line and if I start the player it doesn't see any of my tunes (rendering the unit rather useless to me).

Soooo...what am I doing wrong? See attached log of boot


--Chris Willenbrock
MK2 | 12GB | Queue Registration # 2 (really!)


Attachments
33925-wtf.txt (134 downloads)

_________________________
- Chris Orig. Empeg Queue position 2

Top
#34677 - 18/07/2001 23:18 Re: ftp server with install script [Re: cwillenbrock]
smu
old hand

Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
Hi.

I guess you were really quick and/or used the attachment of my post rather than the file from my homepage (linked in the post itself). The install script omitted to chmod +x /sbin/init.
So just do "/sbin/chmod +x /sbin/init" and you should be ok after the next reboot. You might need to "/sbin/rw" first, though.
This is fixed in the archive that is currently on my homepage (see link in my original post).

cu,
sven
proud MkII owner (12GB blue now green, #080000113)
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord

Top
#34678 - 19/07/2001 16:55 Re: ftp server with install script [Re: smu]
cwillenbrock
enthusiast

Registered: 30/12/2000
Posts: 249
Loc: Dover, NJ
I still can't get this to work. I hope I'm not missing something really obvious.

After running setup.sh I get the same result (I downloaded a fresh copy from your site, btw). Hoses the player so the empeg player software doesn't work, and as far as I can tell, the FTP services don't work. I treid the chmod command you suggested and rebooted, but that doesn't seem to change anything.


--Chris Willenbrock
MK2 | 12GB | Queue Registration # 2 (really!)
_________________________
- Chris Orig. Empeg Queue position 2

Top
#34679 - 20/07/2001 00:36 Re: ftp server with install script [Re: cwillenbrock]
smu
old hand

Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
Hi.

Hmm, from the log that you attached to your original post, it really looks like the error I described (the missing chmod). I just re-checked the archive at http://www.incase.de/empeg/stupid-ftpd-empeg0.9beta1smu.zip, and sure enough, it mysteriously contained a version that omitts the needed chmod instruction. I uploaded (and checked) the archive again, it should now do what it is supposed to do. If you still encounter an error, please include the boot log as well as the output of a "ls -la /sbin/" and a "ls -la /usr/local/bin/" please.

cu,
sven

cu,
sven
proud MkII owner (12GB blue now green, #080000113)
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord

Top
#34680 - 20/07/2001 09:14 Re: ftp server with install script [Re: smu]
cwillenbrock
enthusiast

Registered: 30/12/2000
Posts: 249
Loc: Dover, NJ
That works MUCH better...Thanks!


--Chris Willenbrock
MK2 | 12GB | Queue Registration # 2 (really!)
_________________________
- Chris Orig. Empeg Queue position 2

Top
#34681 - 20/07/2001 15:32 Re: ftp server with install script [Re: smu]
cwillenbrock
enthusiast

Registered: 30/12/2000
Posts: 249
Loc: Dover, NJ
Hrmmm...okay the FTP server is working, and my player isn't hosed, but the FTP install script seems to take out displayserver on boot (tho I can start it up from the command prompt, I'd rather not have to make a serial connection before I use it).

I have displayserver installed to the default location (/usr/local/displayserver/displayserver). I notice in the FTP script read.me file it mentions displayserver at /usr/local/bin/displayserver. Does this have something to do with the problem?


--Chris Willenbrock
MK2 | 12GB | Queue Registration # 2 (really!)
_________________________
- Chris Orig. Empeg Queue position 2

Top
#34682 - 21/07/2001 01:27 Re: ftp server with install script [Re: cwillenbrock]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
Could well be...

I haven't looked at the package yet so I don't know how the init file looks, but if it's a script check
if it tries to start displayserver from the location you mentioned (any error messages on boot?)
If it's a script and does that, try changing the path. If it isn't a script you could try creating a
symlink /usr/local/bin/displayserver -> /usr/local/displayserver/displayserver

/Michael

_________________________
/Michael

Top
#34683 - 21/07/2001 11:44 Re: ftp server with install script [Re: mtempsch]
cwillenbrock
enthusiast

Registered: 30/12/2000
Posts: 249
Loc: Dover, NJ
Well it seems I figured out how to fix my problem. I changed the following line in the /sbin/init script:
[ -x /usr/local/bin/displayserver ] && displayserver &
to....
cd /usr/local/displayserver
./displayserver


I'm not a hacker myself...I'm just now learning how to move around in *nix. I guess this was my first baby-step towards doing something useful in the Linux environment.

Anyhoo...thanks again to sven for putting this script together in the first place.




--Chris Willenbrock
MK2 | 12GB | Queue Registration # 2 (really!)
_________________________
- Chris Orig. Empeg Queue position 2

Top
#34684 - 21/07/2001 15:36 Re: ftp server with install script [Re: cwillenbrock]
smu
old hand

Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
Hi.

I wanted to say thanks to anyone who reported one (or more) error(s). I will rewrite the whole installation part tomorrow (sunday), and post an updated archive as soon as possible.
I'm also currently investigating a possibility to mount the partition r/w when needed and to remount them r/o as soon as possible after the filesystem modifications. This part refers to the ftpd itself though, not the installation.

cu,
sven
proud MkII owner (12GB blue now green, #080000113)
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord

Top