Add fix for net and console
This commit is contained in:
parent
fc7273bf89
commit
2a5c96aee6
41
debian/desktop-environment/clean-install-mate.sh
vendored
41
debian/desktop-environment/clean-install-mate.sh
vendored
@ -37,7 +37,38 @@ choice() {
|
||||
esac
|
||||
done
|
||||
}
|
||||
fix_net() {
|
||||
# More about bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758557
|
||||
nf="/etc/network/interfaces"
|
||||
ifs=($(ip addr | grep -E ':\s.*?:' | cut -d ":" -f 2 | tr -d " "))
|
||||
for value in "${ifs[@]}"
|
||||
do
|
||||
sed -i 's/^[^#]*'.$value.'*/#&/' $nf
|
||||
done
|
||||
systemctl restart networking.service
|
||||
systemctl restart NetworkManager.service
|
||||
systemctl restart NetworkManager-wait-online.service
|
||||
}
|
||||
|
||||
fix_console() {
|
||||
# More about bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=846256#67
|
||||
VAR_DIR_CONSOLE=/etc/systemd/system/console-setup.service.d
|
||||
VAR_DIR_KEYBOARD=/etc/systemd/system/keyboard-setup.service.d
|
||||
if ! [ -d "$VAR_DIR_CONSOLE" ]; then
|
||||
mkdir -p $VAR_DIR_CONSOLE
|
||||
echo "[Unit]" > $VAR_DIR_CONSOLE/override.conf
|
||||
echo "After=systemd-tmpfiles-setup.service" >> $VAR_DIR_CONSOLE/override.conf
|
||||
echo "Add fix for console-setup.service"
|
||||
fi
|
||||
if ! [ -d "$VAR_DIR_KEYBOARD" ]; then
|
||||
mkdir -p $VAR_DIR_KEYBOARD
|
||||
echo "[Unit]" > $VAR_DIR_KEYBOARD/override.conf
|
||||
echo "After=systemd-tmpfiles-setup.service" >> $VAR_DIR_KEYBOARD/override.conf
|
||||
echo "Add fix for keyboard-setup.service"
|
||||
fi
|
||||
systemctl restart console-setup.service
|
||||
systemctl restart keyboard-setup.service
|
||||
}
|
||||
#### Main
|
||||
|
||||
check_root
|
||||
@ -78,4 +109,14 @@ if choice 2>/dev/null; then
|
||||
$APT_INST $PKG_FIREFOX $PKG_NET
|
||||
fi
|
||||
|
||||
echo -ne "\nYou want to run fix_net function? "
|
||||
if choice 2>/dev/null; then
|
||||
fix_net
|
||||
fi
|
||||
|
||||
echo -ne "\nYou want to run fix_console function? "
|
||||
if choice 2>/dev/null; then
|
||||
fix_console
|
||||
fi
|
||||
|
||||
echo -ne "\n\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user