{% if sysprofile %}
{% for snippet_profile in sysprofile|split(';') %}
# Snippet Profile: {{ snippet_profile }}
{% snippet snippet_profile %}
{% endfor  %}
{% else %}
{% snippet 'install_method' %}

key {{ key|default('49af89414d147589') }}

{{ mode }}
{% if manual is undefined %}
{% if auth %}
auth {{ auth }}
{% endif %}
# System bootloader configuration
bootloader --location=mbr{% if kernel_options_post %} --append="{{ kernel_options_post }}"{% endif %}

{% snippet 'network' %}
{#
## Firewall configuration
## firewall in kickstart metadata will enable the firewall
## firewall=22:tcp,80:tcp will enable the firewall with ports 22 and 80 open.
## always allow port 12432 so that beah harness will support multihost
#}
firewall
{%- if firewall|default('disabled') == 'disabled' %} --disabled
{%- else %} --enabled --port=12432:tcp{% if firewall is defined %},{{ firewall }}{% endif %}
{% endif %}

# System keyboard
keyboard {{ keyboard|default('us') }}
# System language
lang {{ lang|default('en_US.UTF-8') }}

reboot
{% snippet 'password' %}
# SELinux configuration
selinux {{ selinux|default('--enforcing') }}

# Configure the X Window System
{% if skipx is defined %}
skipx
{% else %}
{% if not (distro_tree is arch('s390', 's390x')) %}
xconfig --startxonboot
{% endif %}
{% endif %}

{% snippet 'timezone' %}
# Install OS instead of upgrade
install

{% snippet 'print_anaconda_repos' %}
{% snippet 'rhts_scsi_ethdevices' %}
{% snippet 'rhts_partitions' %}
{% snippet 'RedHatEnterpriseLinuxServer5' %}
{% snippet 'system' %}

%packages {{ pkgoptions|default('--resolvedeps --ignoremissing') }}
{% if recipe or packages is defined %}
{% snippet 'rhts_packages' %}
{% else %}
@development-tools
@development-libs
@admin-tools
@base
@base-x
@core
@dialup
@editors
@games
@gnome-desktop
@graphical-internet
@graphics
@java
@office
@printing
@sound-and-video
@text-internet
busybox
comps-extras
cracklib-dicts
gnome-mime-data
iso-codes
kernel-headers
nash
rmt
tzdata
xkeyboard-config
{% endif %}
{% snippet 'packages' %}

{% endif %}{# manual #}

{% endif %}{# sysprofile #}

%pre --log=/dev/console
{% snippet 'rhts_pre' %}
{% snippet 'RedHatEnterpriseLinuxServer5_pre' %}
{% snippet 'system_pre' %}

%post --log=/dev/console
{% snippet 'rhts_post' %}
{% snippet 'RedHatEnterpriseLinuxServer5_post' %}
{% snippet 'system_post' %}

{{ ks_appends|join('\n') }}
{% snippet 'postinstall_done' %}
{% snippet 'post_s390_reboot' %}
{% snippet 'postreboot' %}
