Merge "Remove img-functions from ramdisk-image-create."
This commit is contained in:
commit
c26bd8d655
@ -56,7 +56,6 @@ for arg do RAMDISK_ELEMENT="$RAMDISK_ELEMENT $arg" ; done
|
||||
|
||||
source $_LIB/ramdisk-defaults
|
||||
source $_LIB/common-functions
|
||||
source $_LIB/img-functions
|
||||
source $_LIB/ramdisk-functions
|
||||
|
||||
RAMDISK_ELEMENT=$($SCRIPT_HOME/element-info --expand-dependencies $RAMDISK_ELEMENT)
|
||||
|
@ -141,3 +141,21 @@ function mount_qcow_image() {
|
||||
sudo mount ${NBD_DEV} $WORK_DIR
|
||||
fi
|
||||
}
|
||||
|
||||
function cleanup_dirs () {
|
||||
sudo rm -rf $TMP_BUILD_DIR/built
|
||||
sudo rm -rf $TMP_BUILD_DIR/mnt
|
||||
sudo umount $TMP_BUILD_DIR
|
||||
rm -rf $TMP_BUILD_DIR
|
||||
}
|
||||
|
||||
# Run a directory of hooks outside the target.
|
||||
function run_d() {
|
||||
check_element
|
||||
check_break before-$1 bash
|
||||
if [ -d ${TMP_HOOKS_PATH}/$1.d ] ; then
|
||||
run-parts ${TMP_HOOKS_PATH}/$1.d
|
||||
fi
|
||||
check_break after-$1 bash
|
||||
}
|
||||
|
||||
|
@ -38,13 +38,6 @@ function cleanup () {
|
||||
cleanup_dirs
|
||||
}
|
||||
|
||||
function cleanup_dirs () {
|
||||
sudo rm -rf $TMP_BUILD_DIR/built
|
||||
sudo rm -rf $TMP_BUILD_DIR/mnt
|
||||
sudo umount -f $TMP_BUILD_DIR || true
|
||||
rm -rf $TMP_BUILD_DIR
|
||||
}
|
||||
|
||||
function ensure_nbd () {
|
||||
NBD=`which qemu-nbd` || true
|
||||
if [ -z "$NBD" ]; then
|
||||
@ -127,16 +120,6 @@ function run_d_in_target() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Run a directory of hooks outside the target.
|
||||
function run_d() {
|
||||
check_element
|
||||
check_break before-$1 bash
|
||||
if [ -d ${TMP_HOOKS_PATH}/$1.d ] ; then
|
||||
run-parts ${TMP_HOOKS_PATH}/$1.d
|
||||
fi
|
||||
check_break after-$1 bash
|
||||
}
|
||||
|
||||
function prepare_first_boot () {
|
||||
check_break before-first-boot run_in_target bash
|
||||
if [ -d ${TMP_HOOKS_PATH}/first-boot.d ] ; then
|
||||
|
Loading…
Reference in New Issue
Block a user