This commit is contained in:
xking 2023-03-04 22:25:58 +08:00
parent 19da9aa17a
commit a0ccbed4a4
Signed by: chenkuangwei
GPG Key ID: 931C79A9747F5F82

View File

@ -114,27 +114,7 @@ d-i preseed/late_command string \
in-target update-alternatives --set editor /usr/bin/vim.basic; \
in-target sed -i -e 's/^\(PasswordAuthentication\).*/\1 yes/g' -e 's/^\(PermitRootLogin\).*/\1 yes/g' /etc/ssh/sshd_config; \
in-target sed -i -e '/^GRUB_HIDDEN_TIMEOUT=/d' -e 's/^\(GRUB_HIDDEN_TIMEOUT_QUIET\)=true/\1=false/' /etc/default/grub; \
in-target sh -c '
cat <<EOF >/etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
dhclient -6 eth0
exit 0
EOF
' ;\
in-target sh -c 'cat <<EOF >/etc/rc.local \n #!/bin/sh -e \n # rc.local \n #\n# This script is executed at the end of each multiuser runlevel.\n# Make sure that the script will "exit 0" on success or any other\n# value on error.\n#\n# In order to enable or disable this script just change the execution\n# bits.\n#\n# By default this script does nothing.\n\ndhclient -6 eth0;\n\n exit 0 \n EOF';\
in-target chmod +x /etc/rc.local; \
in-target systemctl enable --now sshd; \
in-target systemctl enable --now rc-local; \