export DIB_ROOT_LABEL to make it global

It is needed by the debian element in the root.d phase. (enviroment.d variables are not available after the base image is built)

Change-Id: Idb8f9795a619687569bcb0de774c87333d11b292
Closes-Bug: #1384103
This commit is contained in:
Ghe Rivero 2014-10-22 13:49:37 +02:00 committed by Ghe Rivero
parent 2337532954
commit 48ce0fde51

View File

@ -89,7 +89,7 @@ function show_options () {
INSTALL_PACKAGES="" INSTALL_PACKAGES=""
IMAGE_TYPES=("qcow2") IMAGE_TYPES=("qcow2")
COMPRESS_IMAGE="true" COMPRESS_IMAGE="true"
DIB_ROOT_LABEL="" export DIB_ROOT_LABEL=""
TEMP=`getopt -o a:ho:t:xucnp: -l no-tmpfs,offline,help,min-tmpfs:,image-size:,image-cache:,max-online-resize:,qemu-img-options:,ramdisk-element:,root-label: -n $SCRIPTNAME -- "$@"` TEMP=`getopt -o a:ho:t:xucnp: -l no-tmpfs,offline,help,min-tmpfs:,image-size:,image-cache:,max-online-resize:,qemu-img-options:,ramdisk-element:,root-label: -n $SCRIPTNAME -- "$@"`
if [ $? -ne 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi if [ $? -ne 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
@ -158,8 +158,6 @@ fi
mk_build_dir mk_build_dir
create_base create_base
# This variable needs to be propagated into the chroot
echo "export DIB_ROOT_LABEL=\"${DIB_ROOT_LABEL}\"" > $TMP_HOOKS_PATH/environment.d/10-dib-root-label.bash
run_d extra-data run_d extra-data
# Run pre-install scripts. These do things that prepare the chroot for package installs # Run pre-install scripts. These do things that prepare the chroot for package installs
run_d_in_target pre-install run_d_in_target pre-install