![预先设置 late_command](https://linux22.com/image/905501/%E9%A2%84%E5%85%88%E8%AE%BE%E7%BD%AE%20late_command.png)
我正在尝试将其添加late_command
到我的预置文件中,但总是出现错误。
这是我正在尝试使用的命令:
in-target curl -L -o /home/$username/postinstall.sh https://raw.githubusercontent.com/netson/ubuntu-unattended/master/postinstall.sh; \
in-target chmod +x /home/$username/postinstall.sh; \
in-target /bin/sh /home/$username/postinstall.sh;
我收到的错误:
Execution of preseed command "in-target curl -L -o /home/$username/postinstall.sh https://raw.githubusercontent.com/netson/ubuntu-unattended/master/postinstall.sh; \
in-target chmod +x /home/$username/postinstall.sh; \
in-target /bin/sh /home/$username/postinstall.sh;" failed with exit code 127.
答案1
我给你留下一个功能齐全的late_command
,你可以看到这个语法:
d-i preseed/late_command string cp /cdrom/files/run.sh /target/root/; chmod +x /target/root/run.sh; in-target /bin/bash /root/run.sh; cp /cdrom/files/configs.sh /target/root/;