How to add custom script in Cubic

Asked by Johnny

Hi,

Do you know how to add a custom script in my ISO Cubic ?

I just want to create a custom script.sh, put it in custom ISO and call it manually after my OS is installed

I don't know where i have to put my custom script.sh for have it in a folder after my custom installation

Best regards

Question information

Language:
English Edit question
Status:
Solved
For:
Cubic Edit question
Assignee:
No assignee Edit question
Solved by:
Johnny
Solved:
Last query:
Last reply:
Revision history for this message
Johnny (johnnybee) said :
#1

I'm trying this working method :

1]
Creating a folder in cubic chroot env with the script inside

2] Call it from preseed file

But this method needs to create something in chroot env. I would like to copy this script from my custom iso to /root folder for example

Revision history for this message
Johnny (johnnybee) said :
#2

Here the right way to inject and run a script :

In cubic chroot container :

mkdir -p /root/myfolder
touch /root/myfolder/myscript.sh

In the preseed file :

ubiquity ubiquity/success_command string \
in-target chmod +x /target/root/myfolder/myscript.sh && /bin/bash/ target/root/myfolder/myscript.sh --ubiquity-success-command

Revision history for this message
Cubic PPA (cubic-wizard) said :
#3

Great! Thanks for sharing!

Revision history for this message
Johnny (johnnybee) said :
#4

ERRATUM : back slash is missing in the last command

ubiquity ubiquity/success_command string \
in-target chmod +x /target/root/myfolder/myscript.sh && /bin/bash/ /target/root/myfolder/myscript.sh --ubiquity-success-command