我正在尝试将其添加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/;