[Spacewalk-list] Kickstart Import Error

Robert Paschedag robert.paschedag at web.de
Mon Aug 13 15:22:01 UTC 2018


Am 13. August 2018 15:48:43 MESZ schrieb Raymond Setchfield <raymond.setchfield at gmail.com>:
>Hi all,
>
>I was wondering if you could assist with this import, and advise why it
>is
>possibly not working;
>
><class 'Cheetah.Parser.ParseError'>:
>
>Long-form placeholders - ${}, $(), $[], etc. are not valid inside
>expressions. Use them in top-level $placeholders only.
>Line 303, column 45
>
>Line|Cheetah Code
>----|-------------------------------------------------------------
>300 |sed -i 's/\#PermitEmptyPasswords no/PermitEmptyPasswords no/'
>${sshd_config} # CIS 5.2.9
>301 |sed -i 's/\#PermitUserEnvironment no/PermitUserEnvironment no/'
>${sshd_config} # CIS 5.2.10
>302 |
>303 |line_num=$(grep -n "^\# Ciphers and keying" ${sshd_config} | cut
>-d:
>-f1)
>                                                 ^
>304 |sed -i '${line_num} a MACs hmac-sha1-etm at openssh.com,
>umac-64-etm at openssh.com,umac-128-etm at openssh.com,
>hmac-sha2-256-etm at openssh.com,hmac-sha2-512-etm at openssh.com,
>hmac-ripemd160-etm at openssh.com,hmac-sha1,umac-64 at openssh.com,
>umac-128 at openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160'
>${sshd_config}  # CIS 5.2.12
>305 |sed -i '${line_num} a Ciphers aes128-ctr,aes192-ctr,aes256-ctr'
>${sshd_config}  # CIS 5.2.11
>306 |
>
>I have attached the kickstart for you to review if needed
>
>Thanks
>
>Ray

You need to escape the bash function ...
$(grep....

Robert
-- 
sent from my mobile device




More information about the Spacewalk-list mailing list