
yum -y update
rhn-satellite restart
4. configCobbler.sh - configure cobbler using this script that:
• performs recommended SELinux changes
• updates settings
• creates the template multipath.conf.template
• creates named and zone templates
• has cobbler create files from templates
#!/bin/bash
# This script will configure cobbler:
# perform recommended SELinux changes
/usr/sbin/semanage fcontext -a -t public_content_t "/var/lib/tftpboot/.*"
/usr/sbin/semanage fcontext -a -t public_content_t "/var/www/cobbler/images/.*"
setsebool -P httpd_can_network_connect true
#place preconfigured settings files into place
/bin/cp /root/resources/settings /etc/cobbler/settings
# Create the dhcpd.template from the existing dhcpd.conf
/usr/bin/head -n -1 /etc/dhcpd.conf > /etc/cobbler/dhcp.template
cat <<'EOF'>>/etc/cobbler/dhcp.template
#for dhcp_tag in $dhcp_tags.keys():
## group could be subnet if the dhcp tags align with the subnets
## or any valid dhcpd.conf construct ... if the default dhcp tag
## in cobbler is the only one used, the group block can be deleted for a
## flat configuration
## group for Cobbler DHCP tag: $dhcp_tag
#for mac in $dhcp_tags[$dhcp_tag].keys():
#set iface = $dhcp_tags[$dhcp_tag][$mac]
host $iface.name {
hardware ethernet $mac;
#if $iface.ip_address:
fixed-address $iface.ip_address;
#end if
#if $iface.hostname:
option host-name "$iface.hostname";
#end if
}
#end for
#end for
}
EOF
# Create the named.template from the existing named.conf
# assumes that the zone configuration are each a single line
grep -v -e db.10.16. -e db.cloud /etc/named.conf > /etc/cobbler/named.template
53 www.redhat.com
Comentarios a estos manuales