Unoffical empeg BBS

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

Topic Options
#64944 - 30/01/2002 23:30 Easy third-party app installs
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
I've just released empeg-preinit. It is a small shim that lies under the normal empeg's init process that forks off any processes that might need to start on boot. It's fairly easy to install, not requiring a developer image, knowledge of the Unix shell, or a serial connection. It relies on Hijack versions v160 and higher (for their ability to find /sbin/hijack before and instead of /sbin/init).

It looks for the directory /etc/preinit.d (which the install creates), and runs any scripts found in that directory (in no particular order, which I'll fix in a future release). The programs in that directory must be bash scripts. They must return or the empeg will be hung upon boot, requiring an upgrade to be applied to the empeg to fix (I'll try to fix this in a future release). It should be easy to FTP new app startup scripts to the empeg at the same time as the app itself.

Any help with easing the install of this helper would be appreciated, and could probably be applied to future third party apps.
_________________________
Bitt Faulk

Top
#64945 - 30/01/2002 23:43 Re: Easy third-party app installs [Re: wfaulk]
danthep
enthusiast

Registered: 29/08/1999
Posts: 209
Loc: new zealand
How much extra boot time does this and hijak add?

bash isn't exactly a leightweight program...

Top
#64946 - 31/01/2002 05:35 Re: Easy third-party app installs [Re: wfaulk]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
Excellent!

A question (I know it can be found out by investigation on empeg or BBS archeology, but I feel lazy now ): what is environment /etc/preinit.d scripts will be run in? I guess only root mounted RO (/proc and music gets mounted by init, right?), no PATH, no swap. Also, I guess your /sbin/hijack call 'real' init after it exausts user scripts. Any other limitations on user scripts (e.g. are they allowed to mount music partitions themselves and leave them mounted...)

Thanks!
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#64947 - 31/01/2002 07:30 Re: Easy third-party app installs [Re: danthep]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
It seems to be insignificant. Perhaps a quarter of a second with no scripts to be run.
_________________________
Bitt Faulk

Top
#64948 - 31/01/2002 07:33 Re: Easy third-party app installs [Re: bonzi]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
It does exec the real init after it's done. I haven't fully tested to see the exact environment that exists when it runs, but I suspect that you're right. I plan to work on some standard way for a script to hang around until whatever resources it needs are ready. However, running a simple daemon like empegVNC works just fine without waiting at all.
_________________________
Bitt Faulk

Top
#64949 - 31/01/2002 08:56 Re: Easy third-party app installs [Re: wfaulk]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Awesome. This is a big step towards easier s/w installs. Great stuff!
_________________________
- Tony C
my empeg stuff

Top
#64950 - 31/01/2002 12:16 Re: Easy third-party app installs [Re: wfaulk]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
I just realized that that didn't answer the question you were asking. I don't know how long bash takes to load, but it's not like it's either going to be started a hundred times (there's not enough memory on the empeg to try to start that many daemons, nor are the bash processes going to be permanent residents in memory. This is (sort of) assured based on the fact that the scripts must return.
_________________________
Bitt Faulk

Top
#64951 - 06/03/2002 10:24 Re: Easy third-party app installs [Re: wfaulk]
peterk
journeyman

Registered: 28/11/2001
Posts: 87
Loc: California (Ex NZ)
Hi Bitt
I downloaded and installed your preinit application, using it to start my first attempt at a HiJack userland app.

Just wanted to say thanks. It was easy to install and works well.

Cheers
PeterK

Top