Run script after Debian installation is complete
Surely the reason that it does not work when trying to execute is because the route has not been declared. You can use this failing that:
d-i preseed/late_command string cp /cdrom/files/jitsi/run.sh /target/root/; chmod +x /target/root/run.sh; in-target /bin/bash /root/run.sh
Bash scripting on debian installer not accepting user input on preseeding
Use debconf for that kind of configuration, it tackles exactly needs like yours.
Adapted example from the manual
Template file (debian/templates
):
Template: your_package/select_option
Type: select
Choices: 1, 2, 3
Description: Which option?
Choose one of the options
Script (debian/config
):
#!/bin/sh -e
# Source debconf library.
. /usr/share/debconf/confmodule
db_input medium your_package/select_option || true
db_go
# Check their answer.
db_get your_package/select_option
if [ "$RET" = "1" ]; then
# Do stuff
fi
passwordless sudo using ubuntu preseed and packer
The problem is that a preseed file can only have one preseed/late_command
section, not multiple.
If you need to execute multiple commands, you can have them as a single late_command separated with ;
e.g.
d-i preseed/late_command string \
in-target cmd1 args ... ; \
in-target cmd2 args ... ; \
...
Related Topics
How to Get Errno When Epoll_Wait Returns Epollerr
Is There Any Difference Between Executable Binary Files Between Distributions
Linux: Checking If a Socket/Pipe Is Broken Without Doing a Read()/Write()
Is There a Libc in Kernel Space
Berkeley Db Mismatch Error While Configuring Ldap
Get Subnet Mask in Linux Using Bash
Rpm Installation Fails Due to Depencency /Bin/Sh Not Found
(Un/De)Compress a String in Bash
Check for Iommu Support on Linux
Find Files Modified Over 1 Hour Ago But Less Than 3 Days
Running Docker on Google Colab
Bash Script That Creates a Directory Structure
Ubuntu Based Docker-Machine Image
Vagrant Ssh -C and Keeping a Background Process Running After Connection Closed
Linux Transfer Parameter for Function in Declare_Work
Difference Between a Stripped Binary and a Non Stripped Binary in Linux