ó 'KXc@sŽddlmZddlZddlZddlZdZejdeƒejdƒejdƒgZd„Zdejfd „ƒYZ dS( iÿÿÿÿ(tStringIONs[a-zA-Z_]+[a-zA-Z0-9_]*s\$s\$[0-9#\?\-@\*]s\$\{.+\}cCs(x!tD]}|j|ƒrtSqWtS(N(tSHELL_VAR_REGEXEStsearchtTruetFalse(ttexttr((sO/opt/freeware/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyt_contains_shell_variable1s tSysConfcBs/eZd„Zd„Zed„Zd„ZRS(cCs#tjj||dtdtƒdS(Nt interpolationtwrite_empty_values(t configobjt ConfigObjt__init__RR(tselftcontents((sO/opt/freeware/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyR 9scCs`|jƒ}tƒ}t|ttfƒrC|jdj|ƒƒn|jt|ƒƒ|jƒS(Ns (twriteRt isinstancetlistttupletjointstrtgetvalue(RRt out_contents((sO/opt/freeware/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyt__str__>s   cs,t|ttfƒs(td|ƒ‚nt|ƒdkr>dSd}|ddkr‹|ddkr‹t|ƒdkr‡fd†}qn|jƒjd ƒr¸|jƒjd ƒr¸n`t j d |ƒrt |ƒr t j d |ƒrú‡fd †}q‡fd†}qt j }n|s"|S||ƒS(NsValue "%s" is not a stringitt"t'iÿÿÿÿicsˆj|ƒ|S(N(t_get_single_quote(tx(R(sO/opt/freeware/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pytOss$(t)s [\t\r\n ]s[\n\"']csˆj|ƒ|S(N(t_get_triple_quote(R(R(sO/opt/freeware/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyR\scsˆj|ƒ|S(N(R(R(R(sO/opt/freeware/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyR_s(RR(RR(RRt basestringt ValueErrortlentNonetstript startswithtendswithtreRRtpipestquote(Rtvaluet multilinet quot_func((RsO/opt/freeware/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyt_quoteGs& *  cCs_|j|j|ƒƒ}|j|j|ƒƒ}|j|ƒ}d|||jdƒ||fS(Ns %s%s%s%s%st=(t_decode_elementR.t_a_to_u(Rt indent_stringtentryt this_entrytcommenttvaltkeytcmnt((sO/opt/freeware/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyt _write_linegs (t__name__t __module__R RRR.R9(((sO/opt/freeware/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyR8s  ( RR)R(R tSHELL_VAR_RULEtcompileRRR R(((sO/opt/freeware/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyts