Replacing the Aging Init Procedure on Linux 628
SmellsLikeTeenGarlic writes "Seth Nickell (of Storage and Gnome HIG fame) has started a new project which aims to replace the aging Init system on Linux. OSNews has more details on the project, directly from Seth. The new Python-based approach will make booting faster and it will talk to the D-BUS daemon, freedesktop.org's leading project. And speaking of freedesktop.org, it is important to mention the release of HAL 0.1, an implementation of a hardware abstraction layer for KDE, XFce and Gnome, based on a proposal by freedesktop.org's founder Havoc Pennington and being implemented by David Zeuthen. It is innovative projects like Storage, SystemServices and HAL that can bring the kind of integration to the underlying system that current X11 desktop environments lack."
Keep this away from my server! (Score:3, Insightful)
This makes it unsuitable for the purpose of starting up system services on a Linux system which does not include Gnome. I think that init was designed with very limited requirements and thus runs on every Linux system no matter how it has been customized.
But that's typically the trade-off in software design: if your software can make more assumptions and be more specific in operation, then often it can be more powerful and integrate better with the specific system it is made to work on. Unfortunately, for something as general and low-level as the service running program, the SystemServices concept seems to specific to be useful for general use.
Which is not to say that it's a useless project, just don't expect to see it replacing init any time soon.
RTFA (Score:5, Insightful)
Re:RTFA (Score:2)
Starting a service: ServiceManager, when you tell it "start org.designfu.SomeService" does a check on SomeService's dependencies, loads those first if necessary, and then activates org.designfu.SomeService using normal dbus activation. Ideally this would mean activating the d
Re:RTFA (Score:2)
Re:RTFA (Score:2)
But certainly SystemServices does have many more dependencies than init, even if none of them are Gnome specific. Python, D-Bus, all of the naming systems and nomenclatures inherent in his description of how services
Re:RTFA (Score:2)
Re:RTFA (Score:3, Funny)
Just kidding (of course).
Re:RTFA (Score:5, Insightful)
Python may be elegant as many other interpreters, but Linux supposed to be more or less Unix-compliant and if you already have /bin/sh there then just use it. There is no justification to complicate things.
Re:Keep this away from my server! (Score:3, Insightful)
SystemServices has four major goals:
Items 2 & 3 are the killer. This is clearly a guy who thinks that the only reason to run Linux is to support an X environment, which is absolutely wrong.
Re:Keep this away from my server! (Score:5, Insightful)
Re:Keep this away from my server! (Score:3, Insightful)
Sadly, I've met plenty of SysAdmins who didn't "get" SysV-style init scripts. Particularly the in-duh-vidual who thought that "S100weblogic" would start after "S99local". [sigh] Admittedly, I wouldn't let this person administer an
Re:Keep this away from my server! (Score:3, Interesting)
and checks to see if it should be doing a graphical bootup.
So, this shows that he doesn't think the only reason to run Linux is to support an X environment. He continues to talk about what would happen IF starting up in a GUI mode were the current choice. He doesn't however ever state that would be the only choice.
Re:Keep this away from my server! (Score:3, Insightful)
Even if it becomes popular, I'm sure there will be distros using traditional init.
Re:Keep this away from my server! (Score:2)
Re:Keep this away from my server! (Score:4, Interesting)
I'm a happy djbdns user but I find it to be less scalable (backup name servers for a domain) without some amounts of work to write rsync scripts, etc.
PS: I love UNIX fs hierarchy and do not intend to change it whatever DJB says.
Why change what isn't broken (Score:2, Insightful)
Re:Why change what isn't broken (Score:2, Insightful)
Re:Why change what isn't broken (Score:4, Informative)
The boot process on Linux is slow. It's one of the few things that seems to be the same about every distribution. Compare boot time on a WinXP box with non-essential services turned off to boot time on a Linux box with non-essential services turned off. WinXP boots a lot faster, at least in my experience. Can the current system be improved enough to compete? At least one person is saying no.
Seth is proposing a new system that would be faster and have daemons "take care of themselves" without the need for tons of complicated scripts. These are valid and appropriate goals. It's not pushing some sort of desktop agenda (the "GNOME is taking over!" conspiracists amuse me, I must say), or forcing you to run X.
This doesn't "address the server-side", or so some people claim, but I've seen no reason that you couldn't easily direct text output to console exactly like the current init does. Of course he's addressing the X desktop - because that's the far more complicated problem.
-Erwos
Because it can be done (Score:5, Insightful)
And as for all of you sticking to the old stuff, because it's good enough: are you sure you are not just getting old? The time I start to whine about progress ("the old way was good enough") will be a sad day indeed. Or perhaps this is the difference between sysadmin-types and programmer-type: sysadmins like to stick to old shell script based system because it's uniquity, while developers see the opportunities of new technologies and have a certain inborn respect for technological superiority.
Linux will evolve, live with it. If the old system is indeed better, it will be used indefinitely, but unless we try something different, we will never know. Having some distros doing the thing in an alternative way is a good way to hash this out.
I for one welcome our new freedesktop.org overlords. I'm really liking the direction that Havoc Pennington and other Gnome-related people are taking as far as desktop things go. We need more dynamic & motivated people like them on powerful positions.
Re:Because it can be done (Score:4, Informative)
Say you are on an enterprise that uses a DHCP server for the network. Say the DHCP server is down, but people still can boot their desktops and do work with no network connection, so productivity doesn't go to hell while they don't get an IP.
Now if you're using dhcp clients on your computer, unplug the network wire. Reboot. See it try for minutes to get a dhcp lease before it continues boot. Now think of services that could trigger the same wait.
Current init: good for servers, not so for desktops.
Re:Because it can be done (Score:3, Insightful)
If the new system is able to rival the configurability and flexiblity of init (and it sounds like it leaves that at the whim of app developers
Re:Because it can be done (Score:3, Insightful)
Re:Why change what isn't broken (Score:3, Insightful)
Why are we replacing perfectly good command line interfaces with GUI's?
Why are we trying to replace X with something modern?
Why are most people dumping FVWM95 for KDE or GNOME?
Why are our filesystems all getting features such as arbitrary metadata attachments on files, and ACL's? (Metadata in filesystems is a feature that could make desktop systems *way*
The new init procedure (Score:3, Funny)
repeat
SCO.account = SCO.account + yourbankaccount
until bankvault = empty
end if
Legacy (Score:2, Interesting)
Cool (Score:5, Interesting)
The current init system is actually fine in my opinion, but if someone comes up with better system that can boot my Linux system as fast as my XP system boots, I'm game.
Re:Cool (Score:4, Informative)
Re:Cool (Score:3, Insightful)
Re:Cool (Score:3, Insightful)
I do find it interesting that anyone beside embedded developers care about Linux boot times. I guess dual-booters might need this, but then again booting and dealing with two different OS's on the same machine is always going to involve some headache.
I mean really how often do you have to reboot your linux box? This isn't the days of Win95 where you had to reboot daily. The most your should e
Booting systems too often (Score:2)
When the damned kernel code I am currently working on panics and I have to debug it
Of course this only applies to about .1% of people doing development - but I hate watching systems boot - it happens WAY too often for me
Re:Cool (Score:4, Insightful)
Re:Cool (Score:4, Funny)
Re:Cool (Score:5, Insightful)
Reminds me of an old story of somebody hired to improve the elevator waiting time that people had been complaining about. Instead of tinkering with elevator algorithms or making it run faster, he simply installed mirrors by the elevator. Nobody complained anymore.
It makes a difference, because it's something I'm waiting for. It's one more minute before I can read email, or search for something on Google, or whatever I turned on the computer to do.
An extra three minutes shutting down, on the other hand, isn't that important for a desktop, because I would probably have walked away to do something else. It might be for a laptop, however, because the user might be waiting to unplug it, etc.
The point is, it's not the amount of time, but whether I'm waiting for it or not. This means that one solution to the problem may simply be downloading Slashdot headlines and showing them while the system boots.
Better init Replacement (Score:3, Funny)
Re:Cool (Score:3)
Or you're running linux on a laptop. I reboot my linux machine as often as 3 times a day, because that's how often I go from one place to another with my computer. Waiting 25 to 30 seconds for my desktop to come up each time I boot is annoying to say the least.
Re:Cool (Score:3)
I'm not running linux, but OS X, on a laptop. I had an uptime of about 65 days before I screwed something up and it had a kernel panic.
Yes, my laptop can sleep. I corrupted 2 hard disks and burned a horrible memory into a battery before I realized how stupid it is to actually use the sleep function on modern laptops.
1) sleep (as opposed to hibernate) doesn't actually shut the machine down, it just puts everything in low power mode, draining your battery. If you
Re:Cool (Score:3)
Is it strictly necessary? No. Is it a big part of how I've learned to code for and support all of those systems? Yes. Would I like to shave a minute or two off every Linux boot time? Definitely.
Re:Cool (Score:3)
That's bullshit. And you know it. Typical (used for mostly only, they're not batteries or anything...) caps hold a miniscule amount of juice.
If an average setup draws 200W of power, then over-the-night amount would be around 1.6kWh, if you've got caps that can store that in few cm^3 and be loaded in few seconds, you'd be an instant billionaire. PC power supply would take hours to load them, thouh, or
XP (Score:5, Interesting)
XP has some serious issues in some cases with the way it "optimizes" the boot order. It appears quick, but in a corporate environment that can lead to weird timing problems. That's probably why MS left/added a feature to disallow logins until XP was really booted.
Re:Cool (Score:3, Interesting)
# Script to run when going multi user.
rc:2345:wait:/etc/rc.d/rc.M
and change it into
# Script to run when going multi user.
rc:2345:once:/etc/rc.d/rc.M
Much faster, isn't it?
Re:Cool (Score:3, Interesting)
That is the thing right there. Your system is a "gaming" rig, and that's probably all you do with it, so you've got it all tweaked and rarely change anything with it. Nothing wrong with that, but, on a "general purpose" machine, or the average XP users machine, I guarantee it slows down to an aching crawl for boot after a few weeks/months of use. This is caused by everything from Quick Books "TSR" bot to default settings in IE that allow ev
Why ? (Score:5, Insightful)
Re:Why ? (Score:5, Insightful)
Remember when everything in /sbin was
staticly linked, /bin -> /usr/bin
and /usr was a separate filesystem?
No more.
The only thing we need still is parallel loading. Methinks a good RC system can do it.
Re:Why ? (Score:2, Interesting)
I 100% agree that linux can use a parallel service loader, but not with the bloat Seth envisions. All systems come with bash. Why not use it? Python is not needed for this.
Personnaly I LIKE my init.d scripts.
Re:Why ? (Score:2, Interesting)
Re:Why ? (Score:5, Insightful)
How about "All POSIX-compatible systems come with a bourne-compatible shell"? I don't see any reason why a developer of an init system, which is so not tied to a specific kernel, should restrict himself to a non-standard embrace-and-extend version when he can also follow open standards, and create something more useful to more people instead.
</rant>
it's 2003, not 1997 (Score:3, Insightful)
I still remember systems where bash scripts did not work as bash was broken or bash accidently was disabled for the user running the scripts. That time (3-5 years ago) there were many flamewars bash-vs-sh. What's happen? Bash is everywhere. Not precisely everywhere, but more systems have bash today.
I think the evolution of unix-like operating systems (especially Linux ones) is moved far forward enough to begin flamewars python-vs-
Re:Why ? (Score:5, Funny)
Interpreter FUD (Score:2, Troll)
System code should only be written in C!
Re:Interpreter FUD (Score:2)
iirc, there was a kernel summit paper about a proper dependency system for init scripts.
Please don't replace me. (Score:5, Funny)
Back in my day, young whippersnappers didn't show disrespect to their
elders by talking about replacing them with fancy-pants code. We were
shell scripts and we liked it.
Not Bash scripts either, real life ksh scripts. You hippies and your
bash shell.. why I outta.. ouch, hurt my arm waving it so.
Anywho.. back in the day when we were happy little startup systems
we didn't have to worry about snakes. Python? Who ever heard of that
back then? We has ksh and csh and WE LIKED IT.
Damn granola-crunching kids and their need to improve what don't need
improving.. Stay in school, don't become pot-junkies and enjoy the
blessed rc that nature intended.
It started with all this Rock and/or Roll that you ingrates listen to.
Back in the 70's we rc scripts were appreciated. Then along comes this
electric gee-tar thing getting so popular and that did it.
Dag nabbit... where's my crontab..
where was I? Oh yeah..
Back in my day, young whippersnappers didn't show disrespect to their
elders by talking about replacing them with fancy-pants code. We were
shell scripts and we liked it.
.
.
.
the Grumpy Old Man on computers.. (Score:2)
Re:Please don't replace me. (Score:3, Funny)
Is it broken enough to need fixing? (Score:2, Informative)
And hey, it's not like we have to boot all that often, is it
Re:Is it broken enough to need fixing? (Score:2)
Who this really benefits are the people who don't leave their computer on every moment possible. The people who don't like the noise; the people who are concious about their Mean Time between failures; the
That's a joke, right? (Score:5, Interesting)
The standard Linux init system is based on sysvinit and is slow precisely _because_ it is interpreted (it's basically a ton of shell scripts). The other reason why it's so slow is because glibc is slow and the init system starts several hundred processes during the init process. Just log in on a freshly restarted Linux system and type "echo $$" in a shell prompt to see how many programs were run before you logged in. On my minit based [www.fefe.de] notebook, the number is below 20. On my minit based server, it's still below 30.
minit takes less than one second to initialize the whole server system, on an aging 466 MHz Celeron box, right from the point where the kernel starts init up to the login prompt. And the server does file sharing, cvs serving, rsync serving, runs a mail server and sshd.
In fact, because minit does not even depend on glibc, minit can probably initialize a small system in less time than it takes to even load python and glibc on this init system.
Fast and python based, give me a break. And the freedesktop people should keep their bloat to themselves, if you ask me. With the notable exception of KDE, all the gui systems on Linux have gotten progressively slower and more bloated over the years. KDE has also become slower, but less drastically, so it can be excused IMHO. But Gtk? Give me a break! Even starting the gnome theme engine takes 5 seconds on my 2 GHz Athlon XP!
Re:That's a joke, right? (Score:5, Informative)
1) Shell-scripting being interpreted is not the bottleneck. The bottleneck is all the processes that most init-scripts start at bootup, as well as stuff like hardware detection, waiting for DHCP leases, etc. Besides, Python isn't interpreted like shell-scripts, it runs on a bytecode-VM. And Python is fast enough that RedHat uses it for its GUI tools, and most people can't tell the difference.
2)KDE has gotten *faster* since 2.0.x. 3.2 is the fastest release since the 1.x series. In the 2.x transition, GNOME got a lot faster, but people didn't notice it as much because GTK 2.x was so much slower.
Re:That's a joke, right? (Score:3, Informative)
KDE is only faster than 2.x if you disable all the new eye candy that is now available, like translucent menus and the flashy theme stuff. Yes, that's comparing apples and oranges, but it's also comparing the default desktops. Keramik is themed with large pixmaps, the kde 2.x default l
Doh. (Score:5, Interesting)
Re:Doh. (Score:5, Insightful)
This still won't stop the GNU folks from fucking it up, though, because more dependencies ensure GPL-lock-in (you didn't think it could happen to us, too, did you?). This isn't a troll, but a very serious issue, where lots of software is becoming very GNU-specific rather than UNIX-specific (I hope everyone can see this distinction).
Re:Doh. (Score:3, Funny)
Well, if GNU is not Unix, isn't the distinction explicit?
Re:Doh. (Score:4, Insightful)
As for "lock-in", well, if GNU's the prison, I don't mind being a criminal.
login (Score:2, Funny)
Already done (Score:2, Offtopic)
This feature has been available for a long time. If you use gdm, run gdmconfig as root, and in the "general" tab, check the box labeled "Login a user automatically on first bootup", and select a username from the dropdown box.
I'm sure kdm has similar features.
Re:login (Score:2)
HAL?? (Score:3, Insightful)
Another Gentoo feature (Score:5, Informative)
The relevant one here is the management of services -- far easier than anything similar I've ever dealt with in the Unix world. I realize that 1) this proposed replacement goes beyond what the Gentoo system manages and 2) real sysadmins running real servers aren't going to leave the existing system any time soon, but for desktop users today, it's a great advance that doesn't get the credit it deserves.
Not very *nix-ish (Score:4, Insightful)
This approach sounds like he is trying to push some specific technologies he is interested in, and so he decided a new init system that uses them would be a nice PR way to push them.
Re:Not very *nix-ish (Score:5, Informative)
Please read the article again, especially the part where Seth Nickell wrote "I *will* provide a way to boot into a "stripped down console mode" aka "single" for system recovery and backup, and a regular non-graphical boot for servers."
From what I can tell, SystemServices in and of itself only depends on D-BUS and libc. There are Python bindings for D-BUS, so that may make it easy to write a script for SystemServices using Python, but that's the extent of Python's relationship to SystemServices.
Re:Not very *nix-ish (Score:5, Informative)
To quote the article:
"SystemServices has four major goals:
1) Provide a full services framework (including handling "boot up")
2) Integrate well with a desktop interface
3) Start X, and then allow login ASAP
4) Allow daemon binaries to directly contribute services rather than requiring each distro/vendor to write shell script wrappers"
Yes, this is very Windows like, but just because it's Windows like does NOT imply it's a bad thing!
FreeBSD, for example, has relied on Perl being available in the past. Gentoo relies on Python. Relying on a scripting language to provide extensibility is not a bad thing.
I'll agree that init works well for servers. I love how DB2 installs itself in the inittab, so init makes sure it's always running. This is a good thing.
Init does not work as well for desktops. My laptop takes incredibly longer to boot Linux than Windows XP. My iPAQ takes a long time to boot Linux, compared to the startup of WinCE. (Yes, I realize that you don't have to restart Linux very often on the iPAQ, but that's not the point)
Keep It Simple Stupid (Score:4, Insightful)
D-BUS, and NIH (Score:5, Insightful)
When will Open Source developers figure out that just because the OS community didn't come up with a technology, doesn't mean it has to be re-written with fewer features?
I gaurantee that whatever aspects of CORBA the D-BUS developers found unnacceptable - complexity, overhead - will be reintroduced into D-BUS by the time it reaches maturity. That's just how these things go - someone decides that Standard X is "cool, but too complicated", and then five years later they realize that their solution has become just as complicated as Standard X because, lo and behold, all that complexity was there for a reason. Real-world solutions never stay simple, because real-world problems aren't simple.
Re:D-BUS, and NIH (Score:3, Insightful)
Ideally a system should follow the 80/20 rule. That is you can do 80% of what most people want to do by only learning 20% of the system. SQL is a good example of this. You can learn only a little bit of SQL and immediatlely put it to use. SQL only gets complicated when you need to do that last 20%.
In
Re:D-BUS, and NIH (Score:3, Informative)
1) The whole distinction between servants, object references, etc, might be nice in whatever fantasy world the standards makers lived on, but its far too complex. A proper standard (POSIX is an excellent example) should scale. Simple things should be simple, and implementation complexity should scale linearly with problem complexity. Objects are a pretty simple idea. CORBA makes them anything but.
2) The C++ mapping is completely braindead. I'm someone
Re:D-BUS, and NIH (Score:4, Informative)
But, I'd hesitate to call it easy to use. The standard C++ language bindings in particular are astonishingly bad:
The situation is reported to look better from other languages, and I can personally confirm that the Java bindings are a delight to work with by comparison (of course in Java it's even easier to just use RMI).
As for the wire-level protocol, I have no complaints about IIOP now that it has readable corbaloc: URLs (the CDR marshalling details are still messy but unless you are writing your own ORB they are taken care of for you). I'm actually a bit surprised that IIOP isn't more widely used on the Internet and in the open source world (outside of GNOME of course) -- it's the distributed computing open standard, it interoperates across languages and OSes, it has numerous [wustl.edu] open-source [fu-berlin.de] implementations [gnome.org], and It Just Works(tm).
Instead we are getting stuff like web services and SOAP, whose wire format is just as incomprehensible to humans (don't kid yourself that XML is easy to read -- have a look at a fully-decked-out SOAP message some day) while using many times as much bandwidth and memory and taking at least ten times as long to parse. (And I say this even though I currently write SOAP gateways for a living.)
Reinventing the wheel? That's the Linux way!! (Score:3, Insightful)
It is antithetical to the UNIX design philosophy, and it betrays an ignorance of history.
IBM tried to "improve" the init sequence in AIX, which was a godawful mess. The concept has not improved over time.
Re:Reinventing the wheel? That's the Linux way!! (Score:3, Informative)
Also, the so called disadvantages of init are void. It looks like he does not understand what init is.
Init is very simple: the kernel calls a program called "init" as soon as the kernel-part of booting is ready.
The "normal" init (there is a SYSV and a BSD variant, the SYSV variant being somewhat more complex) only reads a config file
Usually these are
Transparency should be goal #1 (Score:5, Insightful)
If someone comes up with a whizbang new boot system. great. Just make sure that if something goes wrong, or something needs to be changed, it's:
I don't want some horrific equivalent of the Windows Registry lurking in the background. There should be no mysteries about what gets started and when. I'm not a Windows guru, so maybe this stuff is easy to determine in XP or Server 2003, but I've always found plain ol' text files to be much easier to deal with than fancy-dancy databases. Or at least compile the databases from plain ol' text files.
Re:Transparency should be goal #1 (Score:3, Interesting)
Your complaints seem to be about GNU projects. They do some strange things. Not all of it is incompetence either. Some of it is politics [advogato.org].
That's why you have to take an active stance in avoiding script kiddie projects like GNOME or KDE. Just say no to crap!
Hmm (Score:2, Insightful)
I mean, thats how OSX and Windows got where they are.
Other init alternative (Score:5, Interesting)
Wow .. did someone actually read the paper ? (Score:5, Insightful)
I think Seth's idea is a good one. Of course, there are some things to refine: the dependency shouldn't be external (e.g. SystemService knowing the dependancy tree) but dynamic (e.g. GDM sees that its config requires network login, so it asks SystemService to start network), etc.
But overall rethinking the init is a good thing. Even just opening the debate is a very good thing. The mess of shell scripts is more a giant hack than a well-thought bootstrap system.
Replacing the Aging "Wheel" Device (Score:5, Insightful)
Init Replacements: simpleinit [csiro.au], minit [www.fefe.de], jinit [fremlin.de], runit, daemontools [cr.yp.to], serel [fastboot.org]. Progeny [progeny.org] also has their own system based on Gooch's need/provide architecture.
D-BUS: CORBA [corba.org]
HAL: Discover [progeny.com]
Response from SystemServices author (Score:5, Insightful)
SystemServices: Hardly wheel re-invention. If you read the linked-to article [osnews.com] you'll find that none of the listed "init replacements" address any of my four major goals. They addressed their own goals, which are nice ones I'm sure, but not things that the desktop needs. In fact, the only thing they really add over init that's interesting to me is a dependency system + parallelization. And RH's internal work on init scripts has suggested this results in only small improvements (neighborhood of 30% I believe) in boot time... which is better but not dramatic. Dependency systems are pretty trivial to implement and a dime a dozen, in any case.
DBus: yeah, its a lot like CORBA. Its even more like KDE's DCOP. In fact, its a lot like DCOP. You could even think of it as a major iteration of DCOP. So look, GNOME has been using CORBA for IPC for several years and its still something people avoid using whenever possible. KDE used CORBA for a while, and even with the comparatively nice CORBA/C++ bindings found KDE devs avoided it when possible. CORBA is a freaking PITA to use for lightweight desktop-style stuff. DCOP was the solution (its a good solution, GNOME should have done this ages ago): make it easy enough to use that developers will actually readily communicate over DCOP. Communication protocols have no inherent value on their own. They acquire value when there's things to talk to. Developers won't use the API unless its simple. You can write very simple comm layers for KDE and GNOME around DBUS. Even if we GNOME folk wanted to use CORBA (we don't), KDE wouldn't, and a requirement for DBus being truly useful is that KDE+GNOME have to be willing to use it. End of story.
HAL: I'm not really familiar with discover, so I'm not going to shoot my mouth off (much *grin*). From ransacking the web page you linked to, it doesn't look like discover really supports the sort of "central daemon with notification signals" model that we need to provide good hardware support on the desktop side. Without that... its sort of useless to us. It looks a lot like Kudzu, which is a good thing (and trust me, Havoc who proposed HAL in the first place knows about Kudzu, and probably discover) but it simply isn't what those of us who are in the ditches writing this desktop code need.
Moral of the story: a superficially similar "solution" does not necessarily address the issues that we as desktop developers face. We propose these things because we have concrete problems to solve. Sometimes the problems are not obvious until you try to do something and end up butting into them. We're lazy people, just like anyone, and we don't like :-)
Re:Response from SystemServices author (Score:3, Insightful)
Re:Response from SystemServices author (Score:3, Insightful)
So one thing is that CORBA tends to take a lot of memory, at least relative to DBus and DCOP. A lot of developers will not add a small feature (and lots of lost small features is a big loss) if it means linking with a big library.
For this technical reason, and probably for other really good ones too, but also probably political/historical... I don't think a CORBA based solution would fly with KDE. A system D
Re:Response from SystemServices author (Score:3, Insightful)
simpleinit (Score:5, Informative)
It's dependency-based, so you only start up the services you need. Read all about it. [csiro.au]
Dependancies are a big improvement over runlevels, although you could implement runlevels on top of it.
Been done before (Score:4, Informative)
Making this happen was that the ETLinux folks
More on ETLinux architecture here. [etlinux.org]
This is really simple. (Score:5, Informative)
1) Bootloader straps a kernel
2) Kernel mounts a filesystem ro, and loads init from it
3) init forks a single shell
4) that shell launches everything found in the inittab
5) that shell then procedes to run your init scripts
From that shell what you do is up to you.
In single user {runlevel S/s} you stop at #4, and start from that shell.
Any other runlevel will be started from that shell. It doesn't matter if your scripts are written in perl, csh, sh, php, tcl or python.
It doesn't even matter if you write them in a language that you can compile for extra speed.
99% of your time is in loading the interpreter, and waiting on the daemons themselves.
sendmail is extremely slow on loadup, so are other apps. Try setting dhcp, and having it time out.
or RedHat's retarded Kudzu tool.
Calling those from a faster interpreter, doesn't make them load or run any faster. It never will.
If you think runlevels aren't important... Try patching a running system sometime.
-- Sir Ace
Re:This is really simple. (Score:3, Insightful)
For the record, right now my init system waits for a dhcp lease before making progress. In essence, everything is started up as if it depends on everything before it. In reality,
Why this should not be python (Score:5, Insightful)
init itself is so lightweight and small that it rarely, if ever, fails. This is a good thing, since it's init's job to start a ton of very heavy-weight services.
That said, I see the logic in bloating init with some of the features that are almost always implemented in a distribution built around it. For example, it would be nice to see init perform some service tracking such that it could be told directly to kill a service, and it could do so.
Keep in mind that every time you increase the size of init, you remove a class of systems that can now no longer use it because of it's footprint. This matters a lot for some kinds of embeded systems that have just enough brains (that is, RAM and installed libraries/software) that it makes sense to have init today.
You certainly could not achieve this minimal-growth by re-coding init in Python, Java, Perl, Lisp or any other high-level language. That's not a slam against high-level languages, it's a simple fact of life that their flexibility comes with costs.
As for the shell-script init-scripts, I certainly feel that all of that should be moved out of init's domain. Each application should have a control program (like apachectl) which knows how to start it, stop it, get status, reload configs, etc. That program can be written in C for speed; a high-level, general purpose language for ease of maintenance; or even in shell. But, the point is that that should not be a constraint of init.
init, might well provide a library and/or command-line tools to make writing those controlers easier and more modular, but I don't think there should be any REQUIREMENT that your program know anything more than the calling conventions of an "init controler". The more constraints you heap on, the less software is going to ship ready to integrate with your init system, and that way lies far too much integration work to create a workable OS (and thus MORE variants between distributions, not less).
Once you've done all of that, THEN you can think about the high-level glue so that things like a desktop integrate better.
Mac OS X, NetBSD rc.d, rcNG, and so on (Score:5, Informative)
As someone else noted (in an article with a link done as text, not as an , and with an extra blank in it), Mac OS X has a possibly-interesting scheme for starting and stopping system services. Here's the section on System Initialization [apple.com] in the Mac OS X online documentation; in particular, look at the Startup Items stuff [apple.com].
It's a dependency-based scheme, like at least some of the other proposed system services mechanisms; see the section on adding your own startup items [apple.com].
Note also that Boring Old Init [apple.com] isn't itself changed; /etc/rc runs SystemStarter [apple.com] as its last act, and that starts up the system services. SystemStarter can also be used as a command to start, stop, or restart services, so this isn't just a system startup mechanism.
NetBSD 1.5 and later have a new rc-based system for controlling services [netbsd.org]; it's also dependency-based. FreeBSD 5.x has rcNG [freebsd.org], which is derived from the NetBSD scheme.
(Note that all of those systems have a BSD-style init, and thus don't have run levels.)
Those schemes don't address one of Seth's complaints, however - according to his description in his blog [gnome.org], he doesn't like having shell script wrappers doing the configuration, he wants it done in the service's process itself:
(I express no opinion on this one way or the other; if you like or don't like the idea, send bouquets or brickbats to him, not me.)
Note also that it appears that he is not designing something just for desktops - in particular, he says:
Now, whether the kernel should start ServiceManager directly, or whether it should continue to run init and have ServiceManager started from an rc file, is another issue; I'm not sure that there's a compelling argument to eliminate init other than to discourage people from continuing to use the current rc script scheme (which might be Seth's motivation for running ServiceManager as process 1 - he might want to discourage rc script tweaking).
Perhaps one of the reasons why people thought of ServiceManager as being purely for desktop systems is that they thought that, as D-BUS is somewhat associated with freedesktop.
Please don't fuck up init! (Score:3, Insightful)
To the Linux developers: QUIT BREAKING THINGS from a "unix-like" perspective. If Linux is going to be an entirely unrelated OS, then fine. If it's going to strive to behave similarly, then quit adding features that break expected behaviour, especially for the reason of being 'really cool.'
Re:Python, the prototype language (Score:5, Insightful)
I do tell people just learning to program that it sounds like a good first language.
For internal programming that requires a GUI I tend to use Java. Netbeans is just too good of an IDDE to give up.
For non-gui internal programs I tend to use Perl. Why perl over Python? I know Perl.
For programs that end up in the hands of our customers I use C++.
I really doubt that Python sucks. I have seen too many really good programs written in it.
Re:Great idea if it reduces startup times (Score:5, Informative)
Hmmm... Windows XP gives me a desktop (somewhat) more quickly than Gentoo does, but I have to wait for about 90 seconds to actually do anything or run a program.
It's a tortoise-and-hare thing; Windows (and lately Gnome) give you eyecandy early on at the cost of having to wait with what looks like a perfectly functional desktop while the rest of your base loads. That's why I use Windowmaker. Once I get to GDM it's rare that it takes more than 5 seconds to have a desktop with nothing stalling on me. YMMV, and this is fairly OT anyways since once I'm at GDM, init's not automatically loading stuff anymore.
Re:Thought we would overlook your mistakes? (Score:3, Funny)
Re:Not Natural (Score:5, Informative)
Oww, gawd!
Not Emacs, vi!
Re:About time (Score:5, Insightful)
Re:making or faking? (Score:3, Interesting)
Boot time before change: 41 seconds (*)
after Change: 31 seconds
That was a change that took about 15 seconds.
(*) not 30 as I remembered. Well, I've changed some stuff after I last checked.