[ale] compiled system calls versus shell scripts

Christopher Bergeron cbergeron at dashwerks.com
Thu Oct 23 22:27:14 EDT 2003


 >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.

This is what I was thinking. 

I've basically removed my "shell scripts" altogether and replaced them 
with 1 script.  I put all the commands in the script based on thier 
dependencies and organized it myself.  So it reads like so:

#!/bin/bash
modprobe mousedev
X &

modprobe natsemi
ifconfig eth0 192.168.0.x up
sshd &
nfsd &

... etc ...

What I'm not clear on is if using a Makefile like this:

  :xwin
     modprobe mousedev
     X
  :network
     modprobe natsemi
     ifconfig eth0 192.... up
     sshd
     nfsd

(and make -j) will allow the commands to startup faster than just 
starting them from a single shell script (as above).

Anyone know?

Thanks,
CB



Geoffrey wrote:

> 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. ;)
>




More information about the Ale mailing list