mirror of
https://github.com/bin456789/reinstall.git
synced 2025-12-10 07:28:56 +08:00
特殊处理外部 grub 引导的机器,例如 cloudcone
This commit is contained in:
@ -157,7 +157,12 @@ d-i partman/early_command string true; \
|
||||
|
||||
# debian 10 没有 /target/etc/ssh/sshd_config.d/ 文件夹
|
||||
# kali ssh 默认关闭
|
||||
# 另一种方法处理 cloudcone
|
||||
# if [ "$link_grub_dir" = 1 ]; then mkdir /target/boot/grub2; echo 'chainloader (hd0)+1' >/target/boot/grub2/grub.cfg; fi; \
|
||||
d-i preseed/late_command string true; \
|
||||
link_grub_dir="$(grep -o 'extra\.link_grub_dir=[^ ]*' /proc/cmdline | cut -d= -f2)"; \
|
||||
if [ "$link_grub_dir" = 1 ]; then ln -s grub /target/boot/grub2; fi; \
|
||||
|
||||
in-target systemctl enable ssh; \
|
||||
echo "PermitRootLogin yes" >/target/etc/ssh/sshd_config.d/01-permitrootlogin.conf || \
|
||||
echo "PermitRootLogin yes" >>/target/etc/ssh/sshd_config
|
||||
|
||||
Reference in New Issue
Block a user