Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Kickstart missing 'declare' for %pre?

    Posted on

    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
    

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat