Universal method to start a script at boot

Universal method to start a script at boot

Post by Brad Tille » Tue, 13 Sep 2005 03:30:07


This is off-topic and I apologize. However, I think some here could answer
this.


I'm off-list so if you have an answer, please cc me on replies.

Thanks,
Brad





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

Universal method to start a script at boot

Post by Michael Cl » Tue, 13 Sep 2005 13:30:08


You could use the LSB conforming method of writing and installing
an init script:

http://www.yqcomputer.com/
http://www.yqcomputer.com/
http://www.yqcomputer.com/
http://www.yqcomputer.com/

Most of the main distros support this (Fedora, RHEL, SuSE,
Mandriva, Debian, ...). Not to say all of them ship with the
LSB support packages installed by default. Some do some don't.

On Debian I need to do an "apt-get install lsb".

~mc

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/

 
 
 

Universal method to start a script at boot

Post by Dervish » Tue, 13 Sep 2005 20:10:08


Hi Denis :)

* Denis Vlasenko < XXXX@XXXXX.COM > dixit:

I'm with you in this, in fact I use my own init system, but...


How the heck you make sure that svscan starts the services in the
correct order? Does it run the services in /services in any
particular order or just in the order resulting for a simple
globbing? How you make sure the services are shut down in any
particular order?

All this seems like requiring scripts to do the job (that is,
ensuring a particular order of startup/shutdown), while sysvinit
gets this info from filenames. Obviously, dictating the order using a
script is far more flexible than using filenames but it's not as
simple, and that cannot be seen in the comparisons D.J.B. does in the
homepage of daemontools (which, BTW, is the only source of
documentation, and a very poor one). LSB, on the other hand, is
better structured and although I don't like sysvinit at all, the
system is better documented. And I hate runlevels...

Ra Nez de Arenas Coronado

--
Linux Registered User 88736 | http://www.yqcomputer.com/
http://www.yqcomputer.com/ & http://www.yqcomputer.com/
It's my PC and I'll cry if I want to...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

Universal method to start a script at boot

Post by Michael Cl » Tue, 13 Sep 2005 20:30:18


Actually if you look closer it is a bit smarter than sysvinit and
includes latent functionality that the distros will eventually pick up
on to increase boot speed and allow parallel starting of services (it
codifies boot dependencies with provides and requires - not just boot
order like svsvinit).

http://www.yqcomputer.com/


For example an extract from /etc/init.d/vmware

# Basic support for the Linux Standard Base Specification 1.3
# Used by insserv and other LSB compliant tools.
### BEGIN INIT INFO
# Provides: VMware
# Required-Start: $network $syslog
# Required-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 6
# Short-Description: Manages the services needed to run VMware software
# Description: Manages the services needed to run VMware software
### END INIT INFO

And whether you think it is awful or not - it is the closest thing we
have to universal in Linux land (which is what the original poster was
asking) ie. all of the major distros are aiming for LSB conformance.

~mc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

Universal method to start a script at boot

Post by Dick Johns » Tue, 13 Sep 2005 21:31:18


The embedded systems we use have a "home-made" `init` that
does everything in the coded order. This means that there is
no shell so the system can't be hacked in the usual ways.
Also, some technician in "final test" can't forget to do
something that results in a disaster once a system is in
the field. If the system runs, it's running in its intended
manner.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.13 on an i686 machine (5589.53 BogoMips).
Warning : 98.36% of all statistics are fiction.

****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to XXXX@XXXXX.COM - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

Universal method to start a script at boot

Post by Dervish » Tue, 13 Sep 2005 22:20:10


Hi Denis :)

* Denis Vlasenko < XXXX@XXXXX.COM > dixit:

OK, that's what I supposed. For small systems I usually prefer
the sysvinit approach for ordering, anyway.


Yes ;))))


I know it, too, but I thought it was *based* on daemontools. I'll
take a look at it. Anyway, my init clone is compatible (more or less)
with both init.d and daemontools.

Ra Nez de Arenas Coronado

--
Linux Registered User 88736 | http://www.yqcomputer.com/
http://www.yqcomputer.com/ & http://www.yqcomputer.com/
It's my PC and I'll cry if I want to...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

Universal method to start a script at boot

Post by Brad Tille » Tue, 13 Sep 2005 23:00:10


Thank you. I think this is the best approach for me.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/