Update ipv4_static_interfaces.cfg

This commit is contained in:
Molly Lau 2023-08-27 18:08:59 +09:00 committed by GitHub
parent 7b23d02a6b
commit bd4308387d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,6 @@ network:
# later commands
# Replace ssh port, permit root user login by password, enable sshd service.
# Disable kernel need to restart: https://askubuntu.com/questions/1349884/how-to-disable-pending-kernel-upgrade-message
# Disable and remove snap permanently: https://sysin.org/blog/ubuntu-remove-snap/
# Install some common components.
# Configure vim for more convenient to use.
# Rename netplan config file.
@ -76,15 +75,7 @@ runcmd:
- /etc/init.d/ssh restart
- sed -i 's/#$nrconf{restart} = '"'"'i'"'"';/$nrconf{restart} = '"'"'a'"'"';/g' /etc/needrestart/needrestart.conf
- sed -i "s/#\$nrconf{kernelhints} = -1;/\$nrconf{kernelhints} = -1;/g" /etc/needrestart/needrestart.conf
- snap remove lxd
- snap remove $(snap list | grep "core[0-9]" | head -n 1 | awk '{print $1}')
- snap remove snapd
- apt autoremove --purge snapd -y
- rm -rf /etc/apt/preferences.d/no-snapd.pref
- echo 'Package: snapd' > /etc/apt/preferences.d/no-snapd.pref
- echo 'Pin: release a=*' >> /etc/apt/preferences.d/no-snapd.pref
- echo 'Pin-Priority: -10' >> /etc/apt/preferences.d/no-snapd.pref
- apt update -y
- apt update
- apt install dnsutils fail2ban file lrzsz net-tools traceroute unzip vim wget xz-utils -y
- sed -ri 's/set compatible/set nocompatible/g' /etc/vim/vimrc.tiny
- sed -ri '/set nocompatible/a\set backspace=2' /etc/vim/vimrc.tiny