Set ONBOOT=yes for NICs on install from USB
Update the ifcfg file for all network devices in a %post in the USB kickstart to set ONBOOT=yes. This allows network interfaces to attempt DHCP after initial installation, in order to automatically be enabled and accessible (depending on network configuration). Change-Id: Icaabcd2111e44a5bf2326aee0267b775af95933e Closes-Bug: 1830035 Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
parent
30365dd34a
commit
fa505bfb78
@ -82,3 +82,19 @@ INSTALL_UUID=`uuidgen`
|
|||||||
echo $INSTALL_UUID > /mnt/sysimage/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid
|
echo $INSTALL_UUID > /mnt/sysimage/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid
|
||||||
echo "INSTALL_UUID=$INSTALL_UUID" >> /mnt/sysimage/etc/platform/platform.conf
|
echo "INSTALL_UUID=$INSTALL_UUID" >> /mnt/sysimage/etc/platform/platform.conf
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
%post
|
||||||
|
|
||||||
|
# This is a USB install, so set ONBOOT=yes for network devices.
|
||||||
|
# Doing this in the %post so we don't unintentionally setup a
|
||||||
|
# network device during the installation.
|
||||||
|
for f in /etc/sysconfig/network-scripts/ifcfg-*; do
|
||||||
|
if grep -q '^ONBOOT=' ${f}; then
|
||||||
|
sed -i 's/^ONBOOT=.*/ONBOOT=yes/' ${f}
|
||||||
|
else
|
||||||
|
echo "ONBOOT=yes" >> ${f}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
%end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user