This commit is contained in:
spiritlhl 2023-06-25 11:12:31 +00:00
parent 8ffc781f03
commit 5cc64c264b
3 changed files with 28 additions and 1 deletions

View file

@ -0,0 +1,12 @@
[Unit]
Description=Install ifupdown2 on next reboot
After=network.target
[Service]
Type=oneshot
ExecStart=/root/install_ifupdown2.sh
ExecStartPost=/sbin/reboot
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,15 @@
#!/bin/bash
# from
# https://github.com/spiritLHLS/pve
# 2023.06.25
# 安装ifupdown2
apt-get update
apt-get install -y ifupdown2
# 删除Systemd服务
systemctl disable ifupdown2-install.service
rm /etc/systemd/system/ifupdown2-install.service
# 删除自身
rm $0

View file

@ -3,7 +3,7 @@
# https://github.com/spiritLHLS/pve
# 2023.06.25
cd /root >/dev/null 2>&1
_red() { echo -e "\033[31m\033[01m$@\033[0m"; }
_green() { echo -e "\033[32m\033[01m$@\033[0m"; }
_yellow() { echo -e "\033[33m\033[01m$@\033[0m"; }