diff options
Diffstat (limited to 'build/f_isoroot/f_kscfg')
-rw-r--r-- | build/f_isoroot/f_kscfg/Makefile | 6 | ||||
-rw-r--r-- | build/f_isoroot/f_kscfg/ks.cfg | 27 | ||||
-rw-r--r-- | build/f_isoroot/f_kscfg/ks.cfg.orig | 12 |
3 files changed, 37 insertions, 8 deletions
diff --git a/build/f_isoroot/f_kscfg/Makefile b/build/f_isoroot/f_kscfg/Makefile index fe740418d..2a82a1803 100644 --- a/build/f_isoroot/f_kscfg/Makefile +++ b/build/f_isoroot/f_kscfg/Makefile @@ -13,12 +13,14 @@ TOP := $(shell pwd) .PHONY: all all: @mkdir -p release - @cp ks.cfg release + grep -q OpenStack_Fuel ks.cfg + sed "s/OpenStack_Fuel/$(PRODNO)_$(REVSTATE)/g" ks.cfg > ks.cfg.patched + @cp ks.cfg.patched release/ks.cfg @cp ks.cfg.orig release .PHONY: clean clean: - @rm -rf release + @rm -rf release ks.cfg.patched .PHONY: release release: all diff --git a/build/f_isoroot/f_kscfg/ks.cfg b/build/f_isoroot/f_kscfg/ks.cfg index 8c20971f8..e16139a86 100644 --- a/build/f_isoroot/f_kscfg/ks.cfg +++ b/build/f_isoroot/f_kscfg/ks.cfg @@ -36,9 +36,15 @@ for drv in `ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`; do done default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'` -installdrive="undefined" -forceformat="no" -for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done +installdrive=${installdrive:-undefined} +forceformat=${forceformat:-no} +for I in $(cat /proc/cmdline); do + case "$I" in + *=*) + if ! [[ "${I}" =~ "." ]]; then eval "$I"; fi + ;; + esac +done set ${drives} ${removable_drives} numdrives=`echo $#` @@ -607,3 +613,18 @@ cp -f /etc/skel/.bash* /root/ [[ $(virt-what) = "virtualbox" ]] && echo "blacklist i2c_piix4" > /etc/modprobe.d/blacklist-i2c-piix4.conf %end + + +%post --nochroot --log=/mnt/sysimage/root/anaconda-post-interface-settings.log +#!/bin/bash +set -x + +source "/mnt/sysimage/root/anaconda.cmdline.vars" + +if [[ ! -z $adminif ]]; then + rm -f /mnt/sysimage/etc/sysconfig/network-scripts/ifcfg-${ifname%%:*} + sed "s/${ifname%%:*}/${adminif}/g" \ + /etc/sysconfig/network-scripts/ifcfg-${ifname%%:*} > \ + /mnt/sysimage/etc/sysconfig/network-scripts/ifcfg-${adminif} +fi +%end diff --git a/build/f_isoroot/f_kscfg/ks.cfg.orig b/build/f_isoroot/f_kscfg/ks.cfg.orig index 148ef9908..41a475bbe 100644 --- a/build/f_isoroot/f_kscfg/ks.cfg.orig +++ b/build/f_isoroot/f_kscfg/ks.cfg.orig @@ -36,9 +36,15 @@ for drv in `ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`; do done default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'` -installdrive="undefined" -forceformat="no" -for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done +installdrive=${installdrive:-undefined} +forceformat=${forceformat:-no} +for I in $(cat /proc/cmdline); do + case "$I" in + *=*) + if ! [[ "${I}" =~ "." ]]; then eval "$I"; fi + ;; + esac +done set ${drives} ${removable_drives} numdrives=`echo $#` |