Unoffical empeg BBS

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

Topic Options
#186024 - 22/10/2003 09:28 ? Shell scripts on startup...
rowitech
enthusiast

Registered: 22/09/2002
Posts: 249
Loc: Germany, Cologne
Hi,

I want to try a little bit of shell-scripting on the empeg.
So I started a small script like this:

/drive0/var/rowi.sh:
/bin/echo "popup 3 Hello world..." >/proc/empeg_notify

This works in shell (vi on empeg is so cool), but after adding
in the hijack section of the config.ini I don't see something at startup:

[hijack]
;@EXEC_ONCE /drive0/var/rowi.sh

Why? Is the displayserver started behind this section?
What is the best way to display something on the screen?
Is a cron available or does it eat up too much ressources?

Rolf
_________________________
Connecting Empeg via Bluetooth or Wireless LAN http://empeg.rowi.net
*** Proud owner of the European Worst Install Trophy 2003 ! ***
RoWi

Top
#186025 - 22/10/2003 09:33 Re: ? Shell scripts on startup... [Re: rowitech]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
At a guess, I'd say that the thing that starts up shell scripts at the command line isn't being invoked by hijack. Try changing your line to:

;@EXEC_ONCE /bin/sh /drive0/var/rowi.sh

(Also, to be pedantic, your shell's first line should be:

#!/bin/sh

but it doesn't really make a lot of difference here.)
_________________________
Bitt Faulk

Top
#186026 - 22/10/2003 11:01 Re: ? Shell scripts on startup... [Re: wfaulk]
rowitech
enthusiast

Registered: 22/09/2002
Posts: 249
Loc: Germany, Cologne
Yes, I even tried #!/bin/sh as the first line, but this didn't solve the problem. Nevertheless it's usual to call an own shell at the first line.
With the /bin/sh /drive0/var/rowi.sh it works! Great!
But now I already use an own shell and personally I wouldn't recommend a #!/bin/sh at the first line. Do you agree?

Rolf
_________________________
Connecting Empeg via Bluetooth or Wireless LAN http://empeg.rowi.net
*** Proud owner of the European Worst Install Trophy 2003 ! ***
RoWi

Top
#186027 - 22/10/2003 11:06 Re: ? Shell scripts on startup... [Re: rowitech]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
It's traditional, but it doesn't really mean anything in this case for two reasons. First, you're not using it to tell the OS which shell to use since you're telling it directly. Second, there aren't really any other shells on the empeg to be used. But it's just a comment; it's not going to hurt anything other than to waste 10 bytes. Use it or not; it doesn't make any difference.
_________________________
Bitt Faulk

Top
#186028 - 22/10/2003 11:18 Re: ? Shell scripts on startup... [Re: wfaulk]
rowitech
enthusiast

Registered: 22/09/2002
Posts: 249
Loc: Germany, Cologne
Ok, I'm using it in other scripts so I'm fine to use it here.
But now, I see that I need a sleep command. Do I have to compile it myself? I found some posts with "use /usr/local/bin/sleep" but without even /usr/local/bin there's no sleep. Any Links for a quick download?

EDIT: Found it now in the empire package, works, too.

Rolf


Edited by rowitech (22/10/2003 11:33)
_________________________
Connecting Empeg via Bluetooth or Wireless LAN http://empeg.rowi.net
*** Proud owner of the European Worst Install Trophy 2003 ! ***
RoWi

Top