|
|
@@ -19,16 +19,10 @@ cp scripts/* $FIRST_BOOT_SCRIPTS_DIR
|
|
|
touch $FIRST_BOOT_BASE_DIR/.mustrun
|
|
|
|
|
|
# Deploys
|
|
|
-#See to make automatic root at first login https://serverfault.com/questions/760391/make-no-password-required-on-local-linux-tty-login
|
|
|
-cp /root/.profile /root/.profile.firstboot
|
|
|
-grep -F "$FIRST_BOOT_BASE_DIR" /root/.profile > /dev/null || echo $FIRST_BOOT_BASE_DIR/first-boot-script >> /root/.profile
|
|
|
-
|
|
|
-the_user=$(id -u 1000 -n)
|
|
|
-cp /home/$the_user/.profile /home/$the_user/.profile.firstboot
|
|
|
-grep -F "$FIRST_BOOT_BASE_DIR" /home/$the_user/.profile > /dev/null || echo sudo $FIRST_BOOT_BASE_DIR/first-boot-script >> /home/$the_user/.profile
|
|
|
-
|
|
|
+#https://unix.stackexchange.com/questions/265014/how-to-start-a-script-on-tty-instead-of-asking-for-login-in-systemd
|
|
|
#https://stackoverflow.com/questions/14152026/how-can-i-automatically-login-on-a-tty-and-execute-a-script
|
|
|
#https://unix.stackexchange.com/questions/401759/automatically-login-on-debian-9-2-1-command-line
|
|
|
+systemctl enable first-boot-init.service
|
|
|
|
|
|
echo "You can now run rm -r on this directory"
|
|
|
echo "e.g. :"
|