Kickstart sshpw not working in included file

General support questions
Post Reply
linux_guy_77
Posts: 1
Joined: 2019/11/26 23:46:59

Kickstart sshpw not working in included file

Post by linux_guy_77 » 2019/11/26 23:52:44

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?

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Kickstart sshpw not working in included file

Post by aks » 2019/12/01 16:50:35

%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.

Post Reply