@@ -125,6 +125,9 @@ do_firstrun_automated_network_configuration()
125125 # - Ethernet enable
126126 elif [[ $PRESET_NET_ETHERNET_ENABLED == 1 ]]; then
127127
128+ # remove dhcp config
129+ rm -f /etc/netplan/10-dhcp-all-interfaces.yaml
130+
128131 DEVICE_NAME=${eth_index}
129132 DEVTYPE=ethernets
130133 echo -e " $( createYAML) " > /etc/netplan/30-${DEVTYPE}${CONFIG_NAME} .yaml
@@ -607,7 +610,6 @@ add_user() {
607610 echo -e " \nDear \e[0;92m${RealName} \x1B[0m, your account \e[0;92m${RealUserName} \x1B[0m has been created and is sudo enabled."
608611 echo -e " Please use this account for your daily work from now on.\n"
609612 rm -f /root/.not_logged_in_yet
610- chmod +x /etc/update-motd.d/*
611613 # set up profile sync daemon on desktop systems
612614 if command -v psd > /dev/null 2>&1 ; then
613615 echo -e " ${RealUserName} ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper" >> /etc/sudoers
@@ -706,6 +708,9 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then
706708 loginfrom=$( who am i | awk ' {print $2}' )
707709 who -la | grep root | grep -v " $loginfrom " | awk ' {print $7}' | xargs --no-run-if-empty kill -9
708710
711+ # enable motd
712+ chmod +x /etc/update-motd.d/*
713+
709714 first_input=" $password "
710715 if [ -z " $PRESET_ROOT_PASSWORD " ]; then
711716 echo " "
@@ -932,5 +937,11 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then
932937 printf " \n\n\e[0;91mWarning: a reboot is needed to finish resizing the filesystem \x1B[0m \n"
933938 printf " \e[0;91mPlease reboot the system now \x1B[0m \n\n"
934939 fi
940+
935941 fi
936942fi
943+
944+ # Run provisioning script if exists
945+ if [[ -f /root/provisioning.sh ]]; then
946+ . /root/provisioning.sh
947+ fi
0 commit comments