complete kickstart missing restriction

Change-Id: I390ef9b5899409ec2e4877a84e4151b1ea294cf5
This commit is contained in:
xiaodongwang 2014-10-24 11:18:39 -07:00
parent 0f77a082a0
commit aa0e25dd50
3 changed files with 28 additions and 9 deletions

View File

@ -4,12 +4,6 @@
# System Authorization
auth --useshadow --enablemd5
# System Bootloader
bootloader --location=mbr
# Clear MBR
zerombr
# Use Text Mode
text
@ -70,6 +64,7 @@ $SNIPPET('kickstart_pre_partition_disks')
# Enable installation monitoring
$SNIPPET('kickstart_pre_anamon')
%end
# Packages
%packages --nobase
@ -85,6 +80,7 @@ libestr
libgt
liblogging
rsyslog
%end
%post --log=/var/log/post_install.log
$SNIPPET('log_ks_post')
@ -109,3 +105,4 @@ $SNIPPET($kickstart_tool)
#end if
$SNIPPET('kickstart_post_anamon')
$SNIPPET('kickstart_done')
%end

View File

@ -1,3 +1,15 @@
#set ip_address = ""
#set ikeys = $interfaces.keys()
#for $iname in $ikeys
#set $idata = $interfaces[$iname]
#set $static = $idata["static"]
#set $management = $idata["management"]
#set $ip = $idata["ip_address"]
#if $management and $ip
#set $ip_address = $ip
#end if
#end for
cat << EOF > /etc/chef/run.sh
#!/bin/bash
touch /tmp/chef.log
@ -15,13 +27,20 @@ while true; do
let all_nodes_success=1
for node in \\$nodes; do
mkdir -p /var/log/chef/\\$node
cat << EOL > /etc/chef/\\$node.json
if [ ! -f /etc/chef/\\$node.json ]; then
cat << EOL > /etc/chef/\\$node.json
#if $getVar("local_repo","") != ""
{"local_repo": "$local_repo"}
{
"local_repo": "$local_repo",
"ip_address": "$ip_address"
}
#else
{}
{
"ip_address": "$ip_address"
}
#end if
EOL
fi
if [ ! -f "/etc/chef/\\$node.pem" ]; then
cat << EOL > /etc/rsyslog.d/\\$node.conf
\\\\$ModLoad imfile

View File

@ -210,6 +210,9 @@ done
partition_size=\${partitions_size[/boot]:-500}
unset \${partitions_name[/boot]}
echo "bootloader --location=mbr --driveorder=\${sorted_disks[0]}" >> /tmp/part-include
echo "zerombr" >> /tmp/part-include
echo "part biosboot --fstype=biosboot --size=1 --ondisk=\${sorted_disks[0]}" >> /tmp/part-include
echo "part /boot --fstype=\${partition_fstype} --size=\${partition_size} --ondisk=\${sorted_disks[0]} --asprimary" >> /tmp/part-include
partition_size=\${partitions_size[swap]:-0}
if [[ "\$partition_size" == "0" ]]; then