Kickstart missing 'declare' for %pre?

Latest response

I am attempting to write a few commands into the %pre section of a kickstart file to parse the arg list and assign some variables with which to write out configuration files based on user input.

The problem I have found is that using the following is missing (/tmp/ks-script-Xy187: Error: 'declare' command not found)

declare -A arglist

If I change TTY's I can get declare to work without any issue;

[anaconda root@localhost /]# declare -A test
[anaconda root@localhost /]# test[123]="abc"
[anaconda root@localhost /]# test[098]="xyz"
[anaconda root@localhost /]# for item in ${!test[@]}; do echo "${item} => ${test[${item}]}"; done
098 => xyz
123 => abc

Is this expected behavior when using %pre as follows?

%pre --interpreter=/bin/bash

Responses

These might be silly questions, but is bash really there or in /usr/bin/bash ?

According to env from %pre & %post it is /bin/bash

Try this one without "> " before 'pre'.

%pre --interpreter=/bin/bash

Sorry Masahiro, that is a typo.

%pre --interpreter=/bin/bash
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.