[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Environment Variables and Scipts in config/hooks




Hello:

I'm pretty new to this Debian live tool, so please forgive me if I leave out important info or am not posing my question clearly enough...

Anyway, my script is using live build to create a user and I would like to copy some files from a directory defined by an environment variable to a directory in the newly-created user's home directory.  I have figured I'd do this in a script suffixed with '.chroot' in the config/hooks directory.  The script I am running is run with sudo.  I use the "-E" argument in sudo to preserve the shell environment I have.  So what I'd like to do in my chroot hook script is this:

cp -R $MY_DIR/files /home/<new_user>/.

As it is right now, MY_DIR is undefined as an environment variable when the script is run.  How can I best accomplish what I'm trying to do?

Thanks in advance,

B. Rintoul

Reply to: