How do I pass a variable between scripts?

Asked by Keepiru

How can I set a variable in one script (say, in my pre-start script), and then read it later (in my main start script)? I can kludge it with a temp file, but is there a clean way to make a variable persist between scripts?

Question information

Language:
English Edit question
Status:
Answered
For:
upstart Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) said :
#1

This is not currently possible, the only mechanism is with the temporary file as you suggest

There's a good argument for allowing this with an initctl command to update the environment of a job

Can you help with this problem?

Provide an answer of your own, or ask Keepiru for more information if necessary.

To post a message you must log in.