Linked by Thom Holwerda on Thu 16th Oct 2008 22:08 UTC, submitted by diegocg
Thread beginning with comment 334032
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
RE: Check in demonstration script
by segedunum on Fri 17th Oct 2008 12:44
in reply to "Check in demonstration script"





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. =^_^=