initial
This commit is contained in:
51
proxmox/etc/rc.local
Normal file
51
proxmox/etc/rc.local
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
|
||||
# for con in vtcon0 vtcon1 ; do
|
||||
# if [ -e /sys/class/vtconsole/$con/bind ] ; then
|
||||
# echo 0 > /sys/class/vtconsole/$con/bind ||:
|
||||
# fi
|
||||
# done
|
||||
|
||||
# if [ -e /sys/bus/platform/drivers/efi-framebuffer/unbind ] ; then
|
||||
# for i in 0 1 2 3 4 5 6 7 8 9 ; do
|
||||
# echo efi-framebuffer.$i | tee /sys/bus/platform/drivers/efi-framebuffer/unbind ||:
|
||||
# done
|
||||
# fi
|
||||
|
||||
# ------------------------------------------------
|
||||
# workaround for when the interface name changes
|
||||
# ------------------------------------------------
|
||||
if dmesg | grep -i mlx >/dev/null ; then
|
||||
interface=$(dmesg | grep mlx | grep 'mlx.*.renamed')
|
||||
interface=enp${interface##* enp}
|
||||
interface=${interface%%: *}
|
||||
else
|
||||
# copper ethernet
|
||||
interface=enp8s0
|
||||
fi
|
||||
|
||||
if [ ! "$interface" ] ; then
|
||||
interface=enp8s0
|
||||
fi
|
||||
|
||||
cat > /etc/network/interfaces <<EOF
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
iface $interface inet manual
|
||||
|
||||
auto vmbr0
|
||||
iface vmbr0 inet static
|
||||
address 192.168.100.50/24
|
||||
gateway 192.168.100.1
|
||||
bridge-ports $interface
|
||||
bridge-stp off
|
||||
bridge-fd 0
|
||||
|
||||
EOF
|
||||
|
||||
ifup -a
|
||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
|
||||
# just to make sure this ran
|
||||
date > /tmp/rclocal_last_run.txt
|
||||
Reference in New Issue
Block a user