Brandin Creech wrote:

if [  -f /etc/profile ]; then
  source /etc/profile
fi

I think this type of test is overused; I see it in other scripts also. The
single line 'source /etc/profile' works just fine: if /etc/profile exists and
is readable, 'source /etc/profile' does just what you expect. If, for some
reason, the file doesn't exist or is not readable, 'source /etc/profile' will
produce an error message, which again is probably what you want. Basically
the 'source' instruction already does the test for you, so you don't need to
double the work.

Thanks, Brandin.  And it works fine.

Dan


--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to