1

I am trying to add a late_command to my preseed file but I always get errors.

This is the command I am trying to use:

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;

The error I get:

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 Answers1

2

I leave you a fully functional late_command, you can see the syntax of this:

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/;
ICIM
  • 121