[ale] compiled system calls versus shell scripts

Geoffrey esoteric at 3times25.net
Thu Oct 23 18:49:49 EDT 2003


Jason Day wrote:
> On Thu, Oct 23, 2003 at 01:31:35PM -0400, Geoffrey wrote:
> 
>>pseudo code for example:
>>
>>start eth0
>>
>>start samba &
>>sambapid=$!
>>
>>start nfs &
>>nfspid=$!
>>
>>(wait $sambapid ; mount /win95) &
>>
>>(wait $nfspid; mount /nfsshare) &
> 
> 
> Maintaining that would be a real chore though.

Have you ever maintained a makefile? :)

> If you want to add a
> service, not only do you have to find its dependencies, but you have to
> find the right place in the script to put its invocation.

The same applies for the makefile solution.  You still have to find the 
dependencies and you still have to update the makefile correctly.

> Removing a
> service would be even worse, because you would have to update the
> invocations of every service that depends on it.

You could script around this as well.  Sure, it's more work and more 
complicated, but a makefile with complex dependencies is no less 
complicated.

> If you use the Makefile method, then you only have to update the
> Makefile.  The startup scripts themselves don't have to change.

The start up scripts don't need to change if you're using a script to 
call the scripts. The example I've chosen above was purely tossed 
together.  The bottom line is, you're proposing:

make -f makefile

I'm proposing

start_script.sh

What is the difference between maintaining a makefile or maintaining a 
single script.  For both you have to understand the dependencies.

> 
> And besides, booting with make is just cool :)

Ah, the truth comes out. ;)

-- 
Until later, Geoffrey	esoteric at 3times25.net

Building secure systems inspite of Microsoft



More information about the Ale mailing list