Page 1 of 1

Kickstart sshpw not working in included file

Posted: 2019/11/26 23:52:44
by linux_guy_77
I have a kickstart file with the options:

Code: Select all

sshpw --username=root root --lock
sshpw --username=temp root
This works perfectly without any problems. However, if I put these same exact commands into a file and %include them, it does not work:

Code: Select all

%pre --interpreter=/bin/bash
echo "sshpw --username=root root --lock" > /tmp/lockRoot
echo "sshpw --username=temp root" >> /tmp/lockRoot
%end

%include /tmp/lockRoot
Everything else in the KS remains the same when changing between these two methods.
Any thoughts?

Re: Kickstart sshpw not working in included file

Posted: 2019/12/01 16:50:35
by aks
%include (optional)
Use the %include /path/to/file command to include the contents of another file in the Kickstart file as though the contents were at the location of the %include command in the Kickstart file.
Source: https://access.redhat.com/documentation ... art-syntax

I don't read that as execute this as a script, although if it was defined as a function, you might just be able to call the function.