Hi Scott,
>If not, I think we should do that. Perhaps leaving behind a
'#SNIPPET foo not found'.
It already leaves this message behind in the kickstart file when the snippet is not found
(cobbler-2.0.5-1.el5);
# Error: no snippet data for foo
Regards,
Stefan
-----Oorspronkelijk bericht-----
Van: cobbler-bounces(a)lists.fedorahosted.org
[mailto:cobbler-bounces@lists.fedorahosted.org] Namens Scott Henson
Verzonden: woensdag 2 maart 2011 18:03
Aan: petermity; cobbler(a)lists.fedorahosted.org
Onderwerp: Re: How check for existence of snippet file?
On Wed, 02 Mar 2011 00:12:20 -0800, petermity <6t12-n6js(a)dea.spamcon.org> wrote:
How can I check for the existence of a snippet file before
attempting to include it? That is, something like this:
#set $mysnippet = $mysnipdir + '/mysnipfile'
#if file_exists('$mysnippet')
$SNIPPET('$mysnippet')
#end if
I believe the snippet code will simply not do anything if the snippet
you include doesn't exist. If not, I think we should do that. Perhaps
leaving behind a '#SNIPPET foo not found'.
--
Scott Henson
Red Hat CIS Operator
WVU Alum BSAE/BSME
Informatie van de Raad voor de rechtspraak, de rechtbanken, de gerechtshoven en de
bijzondere colleges vindt u op
www.rechtspraak.nl.