#!/bin/bash

sed -i 's/^GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 console=ttyS0,38400n8 console=tty0"/' /etc/default/grub
update-grub
grub2-mkconfig -o /boot/grub2/grub.cfg

localedef -c -f UTF-8 -i ru_RU ru_RU.UTF-8
localedef -c -f UTF-8 -i en_US en_US.UTF-8

locale-gen
localectl set-locale LANG=en_US.UTF-8

sed -i 's/ens[0-9]/eth0/g' /etc/network/interfaces
mv /etc/sysconfig/network-scripts/ifcfg-{ens2,eth0}

rm $0
history -c
