Hi,

I am having a problem with my snippet file which is;

#import late_command
#set $script = ""
##
##
#set ikeys = $interfaces.keys()
#######################################
## configuring /etc/dhcp/dhclient.conf
#######################################
#set $script += "### configuring interfaces ###\n"
#set $dhclient_file = "/etc/dhcp/dhclient.conf"
#for $iname in $ikeys
    #set $idata = $interfaces[$iname]
    #if $idata.get("static", "0") in ("0", False, "false")
        #set $script += "echo 'interface \"%s\" {' >> %s\n" % ($iname, $dhclient_file)
        #if len($idata.get("dhcp_tag", "")) > 0
            #set $script += "echo 'send user-class = \"%s\";' >> %s\n" % ($idata["dhcp_tag"], $dhclient_file)
        #end if
        #if len($idata.get("dns_name", "")) > 0
            #set $script += "echo 'send host-name = \"%s\";' >> %s\n" % ($idata["dns_name"], $dhclient_file)
        #end if
        #set $script += "echo 'request subnet-mask, broadcast-address, time-offset,' >> %s\n" % $dhclient_file
        #set $script += "echo '  domain-name, domain-name-servers, domain-search, host-name,' >> %s\n" % $dhclient_file
        #set $script += "echo '  netbios-name-servers, netbios-scope, interface-mtu,' >> %s\n" % $dhclient_file
        #set $script += "echo '  rfc3442-classless-static-routes, ntp-servers;' >> %s\n" % $dhclient_file
        #set $script += "echo '}' >> %s\n" % $dhclient_file
    #end if
    #set $script += "echo >> %s\n" % $dhclient_file
#end for
#set $script += "\n"
in-target $late_command.late_command($script, source_method="content") \

When I try to use this I got the error "No module named late_command"

And not create a server/cblr/svc/op/ks/system/system-name

the ouput is :

# *** ERROR ***
#
# There is a templating error preventing this file from rendering correctly. 
#
# This is most likely not due to a bug in Cobbler and is something you can fix.
#
# Look at the message below to see what things are causing problems.  
#
# (1) Does the template file reference a $variable that is not defined?
# (2) is there a formatting error in a Cheetah directive?
# (3) Should dollar signs ($) be escaped that are not being escaped?
#
# Try fixing the problem and then investigate to see if this message goes
# away or changes.
#
# 
# No module named late_command
#   File "/usr/lib/python2.7/dist-packages/cobbler/templar.py", line 135, in render
#     data_out = t.respond()
# 
#   File "cheetah_DynamicallyCompiledCheetahTemplate_1371733170_24_62765.py", line 164, in respond
# 
#   File "cheetah_DynamicallyCompiledCheetahTemplate_1371733170_24_62765.py", line 77, in __errorCatcher2
# 
#   File "<string>", line 1, in <module>
# 
#   File "/usr/lib/python2.7/dist-packages/cobbler/template_api.py", line 170, in SNIPPET
#     result = BuiltinTemplate.SNIPPET(self, file)
# 
#   File "DynamicallyCompiledCheetahTemplate.py", line 88, in SNIPPET
# 
#   File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1597, in _handleCheetahInclude
#     nestedTemplateClass = compiler.compile(source=source, file=file)
# 
#   File "/usr/lib/python2.7/dist-packages/cobbler/template_api.py", line 127, in compile
#     return Cheetah.Template.Template.compile(*args, **kwargs)
# 
#   File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 788, in compile
#     exec(co, mod.__dict__)
# 
#   File "cheetah_DynamicallyCompiledCheetahTemplate_1371733377_35_29325.py", line 26, in <module>
# 

My OS is ubuntu 12.04 and Cobbler is 2.2.2.

What may be the problem?

Regards,

Lutphi