diff options
author | baigk <baiguoku@huawei.com> | 2015-10-09 18:32:31 +0800 |
---|---|---|
committer | baigk <baiguoku@huawei.com> | 2015-10-10 10:17:48 +0800 |
commit | 80c770bb093ad2af54171de1a2c4630536d4daf0 (patch) | |
tree | 693a483f4b4f02eb7dcd908691e2db67f7b6003c /util | |
parent | 00aaaac786bcec0d2de7c14c4f3c5a89ba2553f5 (diff) |
bugfix: libvirt_type should be kvm when host is barebetal mode
JIRA: COMPASS-81
Change-Id: Iba3cb182a3e461ab89eb40fdba7800b8b2a1fc3e
Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/isolinux.cfg | 40 | ||||
-rw-r--r-- | util/ks.cfg | 24 |
2 files changed, 61 insertions, 3 deletions
diff --git a/util/isolinux.cfg b/util/isolinux.cfg new file mode 100644 index 00000000..ca612f77 --- /dev/null +++ b/util/isolinux.cfg @@ -0,0 +1,40 @@ +default vesamenu.c32 +#prompt 1 +timeout 15 + +display boot.msg + +menu background splash.jpg +menu title Welcome to CentOS 6.5! +menu color border 0 #ffffffff #00000000 +menu color sel 7 #ffffffff #ff000000 +menu color title 0 #ffffffff #00000000 +menu color tabmsg 0 #ffffffff #00000000 +menu color unsel 0 #ffffffff #00000000 +menu color hotsel 0 #ff000000 #ffffffff +menu color hotkey 7 #ffffffff #ff000000 +menu color scrollbar 0 #ffffffff #00000000 + +label linux + menu label ^Install or upgrade an existing system + menu default + kernel vmlinuz + append ks=cdrom:/isolinux/ks.cfg initrd=initrd.img mgmt_ip=REPLACE_MGMT_IP mgmt_netmask=REPLACE_MGMT_NETMASK install_ip=REPLACE_INSTALL_IP install_netmask=REPLACE_INSTALL_NETMASK gw=REPLACE_GW external_ip=REPLACE_COMPASS_EXTERNAL_IP external_mask=REPLACE_COMPASS_EXTERNAL_NETMASK external_gw=REPLACE_COMPASS_EXTERNAL_GW dns1=REPLACE_COMPASS_DNS1 dns2=REPLACE_COMPASS_DNS2 + + +label vesa + menu label Install system with ^basic video driver + kernel vmlinuz + append initrd=initrd.img xdriver=vesa nomodeset +label rescue + menu label ^Rescue installed system + kernel vmlinuz + append initrd=initrd.img rescue +label local + menu label Boot from ^local drive + localboot 0xffff +label memtest86 + menu label ^Memory test + kernel memtest + append - + diff --git a/util/ks.cfg b/util/ks.cfg index 7d70e6f2..9e33f42f 100644 --- a/util/ks.cfg +++ b/util/ks.cfg @@ -166,7 +166,11 @@ function save_nic_cfg() { } function save_gateway() { - echo GATEWAY=$gw >> /etc/sysconfig/network + if [[ -z $external_gw ]]; then + echo GATEWAY=$gw >> /etc/sysconfig/network + else + echo GATEWAY=$external_gw >> /etc/sysconfig/network + fi search="domain $domain\nsearch $domain" echo -e "${search}\nnameserver 127.0.0.1" > /etc/resolv.conf [ $dns1 ] && echo -e "${search}\nnameserver $dns1" > /etc/resolv.conf @@ -175,7 +179,11 @@ function save_gateway() { [ $dns2 ] && echo "nameserver $dns2" >> /etc/dnsmasq.upstream if [[ -z "$dns1" && -z "$dns2" ]]; then - echo "nameserver $gw" >> /etc/resolv.conf + if [[ -z $external_gw ]]; then + echo "nameserver $gw" >> /etc/resolv.conf + else + echo "nameserver $external_gw" >> /etc/resolv.conf + fi fi } # Default FQDN @@ -184,19 +192,29 @@ hostname="compass" for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done domain=$hostname gw=$gw +ex_gw=$external_gw install_ip=$install_ip install_netmask=$install_netmask install_intf="eth1" install_hwaddr=`ifconfig $install_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'` +save_nic_cfg $install_intf $install_ip $install_netmask $install_hwaddr + mgmt_ip=$mgmt_ip mgmt_netmask=$mgmt_netmask mgmt_intf="eth0" mgmt_hwaddr=`ifconfig $mgmt_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'` -save_nic_cfg $install_intf $install_ip $install_netmask $install_hwaddr save_nic_cfg $mgmt_intf $mgmt_ip $mgmt_netmask $mgmt_hwaddr + +external_ip=$external_ip +external_netmask=$external_mask +external_intf="eth2" +external_hwaddr=`ifconfig $external_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'` + +save_nic_cfg $external_intf $external_ip $external_netmask $external_hwaddr + save_gateway # already chroot |