Linked by Thom Holwerda on Thu 16th Oct 2008 22:08 UTC, submitted by diegocg
Linux Kexec is a feature that allows to boot kernels from a working kernel. It was originally intended for use by kernel and system developers who had to reboot several times a day. Soon, system administrators for high-availability servers found use for it as well. As systems get more and more advanced, and boot times get longer, end users can now benefit from it.
Thread beginning with comment 334032
To read all comments associated with this story, please click here.
Check in demonstration script
by Doc Pain on Thu 16th Oct 2008 23:58 UTC
Doc Pain
Member since:
2006-10-08

There's one thing I don't understand from the demonstration script shown in the article. It reads as follows:

if [ -x `locate kexec | grep sbin` ]; then

Why does something that is so "near" to the basal operations of the Linux OS relying on a locate database that is up to date (NB: update usually during night time operations periodic script, eventually at the weekend) while it could simply check -x on the default location? Okay, well, I'm implying that there is a default location for kexec. :-) My idea would be to check the usual places, maybe like this:

if [ -x /sbin/kexec -o -x /usr/sbin/kexec ]; then

Another variant would be:

if [ ! `which kexec` ]; then

Just a picky sidenote, forgive me. =^_^=

segedunum Member since:
2005-07-06

I think you're certainly correct there. I don't know why you would want to rely on 'locate' to find kexec. Surely you would check the standard locations?

Reply Parent Bookmark Score: 1