#16001 - 11/09/2000 21:03
Re: Setting up ftp
[Re: dionysus]
|
member
Registered: 13/04/2000
Posts: 134
Loc: Orlando, FL USA
|
Thanks to Hamzy and Dionysus, I've managed to get FTP and Telnet running, but, being the semi linux newbie that I am, I'm running into an issue -
What do I need to do to get the custom init script to work?
As a guess, I renamed /sbin/init, created a new /sbin/init with the above info, did a chmod 755 /sbin/init, and rather than booting into the player, it fails to mount the music partition and dumps me to a shell.
What am I doing wrong?
Thanks,
Bill B. Mk.2 SN 080000183 - 18 GB / Green
_________________________
[orange]Bill B. Mk.2 SN 080000183 - 38 GB /[/orange] [green] Green [/green]
|
Top
|
|
|
|
#16002 - 12/09/2000 08:49
Re: Setting up ftp
[Re: BillB]
|
veteran
Registered: 16/06/1999
Posts: 1222
Loc: San Francisco, CA
|
What I ended up doing is renaming the init script to startplayerinit , then create an init script which, as it's last line, starts the startplayerinit script.. I don't have access to my empeg right now, but if you need me to, I can dig up the actual init script that I used...
-mark
MK2: 36gb Tivo: 90gb CPU: 120gb ...I think drive manufacturers love me!
|
Top
|
|
|
|
#16003 - 12/09/2000 09:37
Re: Setting up ftp
[Re: dionysus]
|
member
Registered: 13/04/2000
Posts: 134
Loc: Orlando, FL USA
|
DOH! Sadly it didn't occur to me that the init script wouldn't do everything that the init bin would do.
It'll be a couple of hours before I can try it, but I'm guessing that should take care of it. However, if you've managed to get inetd to start/not start based on power source, I'd love to know what exactly I need to do in order to make that work.
Thanks,
Bill B. Mk.2 SN 080000183 - 18 GB / Green
_________________________
[orange]Bill B. Mk.2 SN 080000183 - 38 GB /[/orange] [green] Green [/green]
|
Top
|
|
|
|
#16004 - 12/09/2000 13:07
Re: Setting up ftp
[Re: BillB]
|
veteran
Registered: 16/06/1999
Posts: 1222
Loc: San Francisco, CA
|
It's definately doable - but since I was going to attempt wireless ethernet in my car, I hadn't worked on it :-p I'll try something later on though.. It should be doable doing a simple grep of the powersource (as mentioned above in hugo's post) and an even simpler if/then statement.. -mark
MK2: 36gb Tivo: 90gb CPU: 120gb ...I think drive manufacturers love me!
|
Top
|
|
|
|
#16005 - 12/09/2000 15:12
Re: Setting up ftp
[Re: dionysus]
|
member
Registered: 13/04/2000
Posts: 134
Loc: Orlando, FL USA
|
I've tried playing around some more, and I'm still stuck.
It still fails to mount the music partition and dumps me to a shell, and if I run the playerinit from there, everything's fine, but it doesn't seem to be running my script. In fact, I just tried to do /sbin/init and gave me 'no such file or directory'. I think I'm confused. I can see it in the directory, I can display the contents, but it won't run (and I did a chmod 755).
I'm guessing it's probably something simple. Any ideas?
Thanks,
Bill B. Mk.2 SN 080000183 - 18 GB / Green
_________________________
[orange]Bill B. Mk.2 SN 080000183 - 38 GB /[/orange] [green] Green [/green]
|
Top
|
|
|
|
#16006 - 12/09/2000 15:47
Re: Setting up ftp
[Re: BillB]
|
veteran
Registered: 16/06/1999
Posts: 1222
Loc: San Francisco, CA
|
..How're you accessing the startplayer? dont' forget to use an exec command for it..: exec startoriginalinitscript
...at the end of your custom init script.. -mark
MK2: 36gb Tivo: 90gb CPU: 120gb ...I think drive manufacturers love me!
|
Top
|
|
|
|
#16007 - 12/09/2000 15:56
Re: Setting up ftp
[Re: dionysus]
|
member
Registered: 13/04/2000
Posts: 134
Loc: Orlando, FL USA
|
A few minutes ago, I deleted and rewrote the script from scratch, and it's working now... I have NO idea. Out of curiousity,(forgive my lack of linux knowledge) why the exec? It seems to be working without it... Also, I can't seem to telnet into the empeg unless the root fs is rw. I'm guessing this is normal? If so, I would assume , since exiting the player spawns a new shell, putting rw after calling the old init won't help. Have you found away around this? Bill B. Mk.2 SN 080000183 - 18 GB / Green Edited by BillB on 13/9/00 00:02 AM.
_________________________
[orange]Bill B. Mk.2 SN 080000183 - 38 GB /[/orange] [green] Green [/green]
|
Top
|
|
|
|
#16008 - 12/09/2000 21:02
Re: Setting up ftp
[Re: BillB]
|
member
Registered: 13/04/2000
Posts: 134
Loc: Orlando, FL USA
|
OK, I did some reading and understand the exec thing. So, nevermind about that.
I guess the only issues that remain are:
The telnet/read-only issue - I thought that it might make sense, because with the FS set to r/o, it can't write to /usr/sbin/in.telnetd, but ftp works under the same conditions. Should telnet work with the FS r/o, or did I set something up incorrectly?
The /proc/empeg_power thing - I've mostly figured out. I've got a script written that successfully checks for AC power, but I don't know what the contents of /proc/empeg_power looks like when connected in the car. I'll have to rip the dash out to connect the serial cable to the sled, so before I do that, - when the car is connected to Ac, the line in empeg_power reads: 0 (AC Power)
does anyone know what the line is when the car is connected via the sled? 0 (DC Power) or ?????
Thanks in advance,
Bill B. Mk.2 SN 080000183 - 18 GB / Green
_________________________
[orange]Bill B. Mk.2 SN 080000183 - 38 GB /[/orange] [green] Green [/green]
|
Top
|
|
|
|
#16009 - 12/09/2000 22:11
Re: Setting up ftp
[Re: BillB]
|
pooh-bah
Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
|
>does anyone know what the line is when the car is connected via the sled? >0 (DC Power) or ?????
Sorry if this sounds like a smart ass comment, but...
if(/proc/empeg_power == "0 (AC POWER)") { stuff } else { other stuff }
Would work right? Or is there another condition that I am missing?
-Mike
|
Top
|
|
|
|
#16010 - 13/09/2000 04:54
Re: Setting up ftp
[Re: mcomb]
|
member
Registered: 13/04/2000
Posts: 134
Loc: Orlando, FL USA
|
Originally, I set the script up just to grep for 'AC power' rather than the whole line (don't ask me why). Which brought up the question of what changes when it's in the car. Like an idiot, I didn't even think about greping for the whole 'known' line. I guess that's what I get for trying to do things that require thought after my bedtime. Bill B. Mk.2 SN 080000183 - 18 GB / Green
_________________________
[orange]Bill B. Mk.2 SN 080000183 - 38 GB /[/orange] [green] Green [/green]
|
Top
|
|
|
|
#16011 - 14/09/2000 06:26
Re: Setting up ftp
[Re: BillB]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
The most logical guess seems to be at home: 0 (AC Power) in car: 1 (DC Power)
If this is the case, then all you have to do is extract the "head" and "cut" commands from the debian image and do this:
if [ `head -1 /proc/empeg_power | cut -c 1` -eq "0" ]; then # do AC power stuff ; else # do DC power stuff fi
--- MkII 080000554
|
Top
|
|
|
|
#16012 - 14/09/2000 06:59
Re: Setting up ftp
[Re: tonyc]
|
member
Registered: 13/04/2000
Posts: 134
Loc: Orlando, FL USA
|
I actually wound up using:
if cat /dev/empeg_power | grep '0 (AC Power)' then inetd &
which seems to work well. Unfortunately, while trying to fix my Telnet issue, I hosed something else - Not sure how important it is, but when I run mount, it only displays the root filesystem. But if I try and mount the other fs's, they're already mounted (and accessable).
Oh well, my last effort last night before bed was to reload dev1.0. Looks like it's back to the beginning...
Bill B. Mk.2 SN 080000183 - 18 GB / Green
_________________________
[orange]Bill B. Mk.2 SN 080000183 - 38 GB /[/orange] [green] Green [/green]
|
Top
|
|
|
|
#16013 - 14/09/2000 22:09
Re: Setting up ftp
[Re: BillB]
|
member
Registered: 13/04/2000
Posts: 134
Loc: Orlando, FL USA
|
sorry - I meant /proc/empeg_power.
Bill B. Mk.2 SN 080000183 - 18 GB / Green
_________________________
[orange]Bill B. Mk.2 SN 080000183 - 38 GB /[/orange] [green] Green [/green]
|
Top
|
|
|
|
#16014 - 21/09/2000 09:53
Re: Setting up ftp
[Re: BillB]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
In fact, I just tried to do /sbin/init and gave me 'no such file or directory'. I think I'm confused. I can see it in the directory, I can display the contents, but it won't run (and I did a chmod 755).
I guess that it is finding the script, but it doesn´t find the shell which is stated in the (first) "#!" line of the script. The error message doesn´t state which file it doesn´t find, and is not really helpful as a result. But in the case of shell scripts (also perl, tcl, ...) it is always good to check if the script file exists (in the dir where it is expected), if it is executable, and if the interpreter given in the first line (/bin/bash, usr/bin/perl or something like that) exists and is executable. If either the script or the interpreter does not exist, the error message usually is "permission denied" though.
cu, sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#16015 - 21/09/2000 09:58
Re: Setting up ftp
[Re: dionysus]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
dont' forget to use an exec command for it..: exec startoriginalinitscript
Why? I know what exec does, but what is the reason for doing exec´ing (the oríginal) init? I have a vague idea it might be something with shutdown.
cu, sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#16016 - 21/09/2000 10:10
Re: Setting up ftp
[Re: BillB]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
Also, I can't seem to telnet into the empeg unless the root fs is rw. I'm guessing this is normal? If so, I would assume , since exiting the player spawns a new shell, putting rw after calling the old init won't help. Have you found away around this
I can´t give a workaround (though my info might hint you towards one), but I think I can explain what happens: telnetd usually does wtmp and/or utmp entries, which means it puts a record into the appropriate logfile when a user logs on (so that "who" can show that user) and updates it at logout (so that it is not shown by "who" anymore, but "last" show when he/she logged in and when the logout happened). There might be a commandline option that tells telnetd not to log to wtmp/utmp.
cu, sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#16017 - 22/09/2000 00:47
Re: Setting up ftp
[Re: mcomb]
|
member
Registered: 11/09/2000
Posts: 143
Loc: Jylland, Denmark
|
Hi,
You're missing
-1 (NO POWER)
;)
Lars
Lars
_________________________
Lars
MkII 40gig 090000598
|
Top
|
|
|
|
#16018 - 26/04/2001 11:40
Re: Setting up ftp
[Re: dionysus]
|
old hand
Registered: 12/01/2000
Posts: 1079
Loc: Dallas, TX
|
Did you ever find a run-this-and-it-will-work solution?
Sean
80000078
|
Top
|
|
|
|
#16019 - 26/04/2001 15:35
Re: Setting up ftp
[Re: Terminator]
|
veteran
Registered: 16/06/1999
Posts: 1222
Loc: San Francisco, CA
|
wow; talk about re-visiting an old thread...
Yes - but I can't remember the original problem now:)
-mark
...proud to have owned an Empeg since 00287
|
Top
|
|
|
|
#16020 - 26/04/2001 17:01
Re: Setting up ftp
[Re: dionysus]
|
old hand
Registered: 12/01/2000
Posts: 1079
Loc: Dallas, TX
|
I think I may have misread the thread. I was hoping for an installer for ftp like what Frank has for displayserver.
Sean
80000078
|
Top
|
|
|
|
#16021 - 27/04/2001 15:02
Re: Setting up ftp
[Re: Terminator]
|
veteran
Registered: 16/06/1999
Posts: 1222
Loc: San Francisco, CA
|
In reply to:
I think I may have misread the thread. I was hoping for an installer for ftp like what Frank has for displayserver.
That was my original plan; then I got a 70hours+/week job:(
-m ...proud to have owned an Empeg since 00287
|
Top
|
|
|
|
|
|