Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using legacy network interface names (eth0) #573

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions kickstarts/base.ks.erb
Original file line number Diff line number Diff line change
Expand Up @@ -127,24 +127,9 @@ passwd -e root
# Remove root from the cockpit disallowed-users list
sed -i s/root//g /etc/cockpit/disallowed-users

# During the image build, dracut sets up ifcfg-en<whatever> for the device.
# On the appliances we expect eth0, so remove all the ifcfg-en<whatever> device configurations
# and write a config for eth0 allowing the 'network' service to come up cleanly.
rm -f /etc/sysconfig/network-scripts/ifcfg-en*

# Remove machine-id
cat /dev/null > /etc/machine-id

cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
NM_CONTROLLED=no
DEFROUTE=yes
EOF

chvt 1
) 2>&1 | tee /dev/tty3
%end
8 changes: 4 additions & 4 deletions kickstarts/partials/main/bootloader.ks.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<% if @target == "ec2" || @target == "openstack" %>
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0 console=tty0 console=ttyS0,115200n8"
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet console=tty0 console=ttyS0,115200n8"
<% elsif @target == "azure" %>
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0 console=ttyS0 earlyprintk=ttyS0 rootdelay=300"
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet console=ttyS0 earlyprintk=ttyS0 rootdelay=300"
<% elsif @target == "gce" %>
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0 console=ttyS0,38400n8"
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet console=ttyS0,38400n8"
<% else %>
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0 console=ttyS0,115200 console=tty0"
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet console=ttyS0,115200 console=tty0"
<% end %>
2 changes: 0 additions & 2 deletions kickstarts/partials/post/gce.ks.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ EOF

# Lock root account
usermod -L root

echo "PERSISTENT_DHCLIENT=1" >> /etc/sysconfig/network-scripts/ifcfg-eth0