Re: Python init
- From: "Douglas A. Tutty" <dtutty@xxxxxxxxxxxxx>
- Date: Wed, 22 Aug 2007 02:48:37 +0000
On Tue, Aug 21, 2007 at 07:11:57PM -0700, Steve Lamb wrote:
Not that all of the libraries need to be moved into the root partition
for it to function as a stable init platform. Outside of sys (which is
compiled in), os, re, shutil, time and datetime I can't think of anything
that is needed for scripts running at init time. Certainly not many of the
extended Python libraries like a minimal web server, a whole suite for
handling email and MIME, TK/TCL bindings and so on. A very rough check and
I think 2.5Mb would be sufficient to serve as an init platform and natively
cover more than 80-90% of any operation an init script would need. So that
increase of 10-20% at 10Mb is more like 3-5%, if that.
Neat. Anyone have a testbed to try it on? I mean, move the minimal
python stuff to /bin and /lib and remove it from /usr, verify that it
runs, then try replacing some initscripts? I'm all out of spare boxes
right now.
Taken to the nth degree, it could totally change how the initscripts
work. Instead of separate scripts in /etc/init.d run one at a time by
run-parts, they could be individual modules (and hense optimized), run
by a new /etc/init.d/rc python script. This would start off by
importing each module then running its main function. This would
totally do away with the process overhead of the sysVinit system while
maintaining support for run levels.
However, since unixes are in part differentiated in how they handle init
scripts, replacing sysVinit with PythonInit would be a huge deal. At a
minimum, it would require a new update-rc.d command so that packages
would be setup correctly. Update-rc.d would also have to detect if a
package included an sh startup script and setup the PythonInit to
os.system the script instead of loading it as a module.
Doug.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- Follow-Ups:
- Re: Python init
- From: Noah Dain
- Re: Python init
- References:
- Re: bash vs. python scripts - which one is better?
- From: Manon Metten
- Re: bash vs. python scripts - which one is better?
- From: Manon Metten
- Re: bash vs. python scripts - which one is better?
- From: Douglas A. Tutty
- Re: bash vs. python scripts - which one is better?
- From: David Brodbeck
- Re: bash vs. python scripts - which one is better?
- From: Steve Lamb
- Re: bash vs. python scripts - which one is better?
- From: David Brodbeck
- Python init (was: bash vs. python scripts - which one is better?)
- From: Steve Lamb
- Re: Python init (was: bash vs. python scripts - which one is better?)
- From: Rick Thomas
- Re: Python init
- From: Steve Lamb
- Re: bash vs. python scripts - which one is better?
- Prev by Date: Re: harddisc errors
- Next by Date: Re: Apache2 & php5 Problem
- Previous by thread: Re: Python init
- Next by thread: Re: Python init
- Index(es):
Relevant Pages
|
|