summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2015-10-12 05:32:17 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-10-12 05:32:17 +0000
commit2cbacbc060805b446769def612253798f3b7fb03 (patch)
tree1619e8bde3ff9f988b7f7a7bd9ce7a8a5f2cf867 /util
parentd27248783e7f49f4edb3a584ffd06c56c61b32c5 (diff)
parent80c770bb093ad2af54171de1a2c4630536d4daf0 (diff)
Merge "bugfix: libvirt_type should be kvm when host is barebetal mode"
Diffstat (limited to 'util')
-rw-r--r--util/isolinux.cfg40
-rw-r--r--util/ks.cfg24
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