OK, hotmail sucks! Please see below. hopefully this time with proper line breaks.
________________________________
From: danpg102(a)hotmail.com
To: cobbler(a)lists.fedorahosted.org
Subject: Snippet with generalized functions
Date: Mon, 28 Jul 2008 18:26:37 -0500
Attached is a snippet that makes use of cheetah methods. These are similar to some of the
functionality that the Solaris SST offers. They basically encapsulate many (usually
obscure) sed commands into handy functions.
$set_config_value('/etc/login.defs', 'LOGIN_RETRIES', 3)
is more readable than:
perl -npe 's/^([ \t]*$LOGIN_RETRIES[ \t]+)[\x21-\x7E]*([
\t]*(#.*)?)$/\${1}3\${2}/' -i '/etc/login.defs'
and the perl (sed) command doesn't take into account the possibility that
LOGIN_RETRIES may not already be present in the file. The use of a function makes
kickstart templates more readable and helps avoid errors.
Because of the utility of these functions, I would suggest they be distributed with
cobbler, possibly as 'built-in' methods.
Development note: although I have tested that these functions do not cause any Cheetah
errors, I have not tested the resulting kickstarts in an actual provision. They may still
cause errors on the client side :( .
~
Dan
________________________________
With Windows Live for mobile, your contacts travel with you. Connect on the go.
_________________________________________________________________
With Windows Live for mobile, your contacts travel with you.
http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_mobile_...