Product specifications
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
EOF
# The SAP-Repository, which is needed for SAP HANA
cat > /etc/yum.repos.d/rhel-sap.repo << EOF
[sap]
name=Red Hat Enterprise Linux for SAP
baseurl=ftp://${SERVER}/pub/rhel6/sap
enabled=1
gpgcheck=0
EOF
%end
# ********** Post-Installation 4: Create the resolv.conf file **********
%post --interpreter /bin/bash
# Part 1: Declaration of the network parameters. !!!!!!!!!! To be modified by
OEM. !!!!!!!!!!
DOMAINS=example.com,sap.corp
DNS1=192.168.1.100
DNS2=192.168.1.200
# Part 2: Fill the file /etc/resolv.conf
cat > /etc/resolv.conf << EOF
search ${DOMAINS}
nameserver ${DNS1}
nameserver ${DNS2}
EOF
%end
# ********** Post-Installation 5: Create the network devices and the UDEV rules
**********
# Part 1: Declaration of the network parameters. !!!!!!!!!! To be modified by
OEM. !!!!!!!!!!
%post --interpreter /bin/bash
BPROTO[0]="static"
IPADDR[0]=192.168.0.101
PREFIX[0]=22
HWADDR[0]=00:25:5c:d4:fc:0c
BPROTO[1]="none"
IPADDR[1]=
PREFIX[1]=24
HWADDR[1]=00:25:5c:d4:fc:0d
BPROTO[2]="none"
IPADDR[2]=
PREFIX[2]=24
HWADDR[2]=00:25:5c:d4:fc:02
BPROTO[3]="none"
IPADDR[3]=
PREFIX[3]=24
HWADDR[3]=00:25:5c:d4:fc:03
HOSTNAME=oemhanar07
GATEWAY=192.168.0.1
DOMAIN=example.com,sap.corp
DNS1=192.168.1.100
DNS2=192.168.1.200
# Part 2: Save the persistent udev rules
mv /etc/udev/rules.d/70-persistent-net.rules /root
# Part 3: Fill the network configuration files and the persistent udev rules
i=0;
max=${#IPADDR[@]}
while [ $i -lt $max ]; do
if [ "${BPROTO[${i}]}" == "none" ]
then
bootstart="no";
else
bootstart="yes";
fi
# Define the given static interfaces
cat > /etc/sysconfig/network-scripts/ifcfg-eth${i} << EOF
DEVICE=eth${i}
30
P U B L I C
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Red Hat Enterprise Linux (RHEL) 6.5 Configuration Guide for SAP HANA
Appendix