You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
1022 B

#!/bin/bash
if [ -d /etc/lightdm ]; then
cat <<EOF >/etc/lightdm/lightdm.conf
[Seat:*]
autologin-session=xubuntu
autologin-user=live
autologin-user-timeout=0
EOF
fi
if [ -d /etc/NetworkManager ]; then
echo "Disable dhclient.service autostart." >>$OUTPUT 2>&1
systemctl disable dhclient >>$OUTPUT 2>&1
mkdir -p /etc/netplan >>$OUTPUT 2>&1
cat <<EOF >/etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
# Set and change netplan renderer to NetworkManager GUI tool
network:
version: 2
renderer: NetworkManager
EOF
cat <<EOF >/etc/NetworkManager/NetworkManager.conf
[main]
rc-manager=resolvconf
plugins=ifupdown,keyfile
dns=dnsmasq
[ifupdown]
managed=false
EOF
if [ $DEBIAN_FRONTEND_TYPE = "noninteractive" ]; then
dpkg-reconfigure -f noninteractive network-manager >>$OUTPUT 2>&1
elif [ $DEBIAN_FRONTEND_TYPE = "dialog" ]; then
dpkg-reconfigure network-manager >>$OUTPUT 2>&1
fi
fi