Merge "Enable running disk-image-create on SUSE Linux"
This commit is contained in:
commit
9233ca4056
1
bin/dib-run-parts
Symbolic link
1
bin/dib-run-parts
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../elements/dib-run-parts/bin/dib-run-parts
|
4
elements/dib-run-parts/root.d/dib-run-parts → elements/dib-run-parts/bin/dib-run-parts
Normal file → Executable file
4
elements/dib-run-parts/root.d/dib-run-parts → elements/dib-run-parts/bin/dib-run-parts
Normal file → Executable file
@ -45,7 +45,9 @@ fi
|
|||||||
# We specifically only want to sort *by the numbers*.
|
# We specifically only want to sort *by the numbers*.
|
||||||
# Lexical sorting is not guaranteed, and identical numbers may be
|
# Lexical sorting is not guaranteed, and identical numbers may be
|
||||||
# parallelized later
|
# parallelized later
|
||||||
targets=$(find $target_dir -type f -executable -printf '%f\n' | grep -E "$allowed_regex" | LANG=C sort -n)
|
# Note: -maxdepth 1 ensures only files in the target directory (but not
|
||||||
|
# subdirectories) are run, which is the way run-parts behaves.
|
||||||
|
targets=$(find $target_dir -maxdepth 1 -type f -executable -printf '%f\n' | grep -E "$allowed_regex" | LANG=C sort -n)
|
||||||
|
|
||||||
PROFILE_DIR=$(mktemp -d /tmp/profiledir.XXXXXX)
|
PROFILE_DIR=$(mktemp -d /tmp/profiledir.XXXXXX)
|
||||||
|
|
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
home=$(dirname $0)
|
home=$(dirname $0)
|
||||||
exec sudo install -m 0755 -o root -g root -D \
|
exec sudo install -m 0755 -o root -g root -D \
|
||||||
$home/dib-run-parts \
|
$home/../bin/dib-run-parts \
|
||||||
$TARGET_ROOT/usr/local/bin/dib-run-parts
|
$TARGET_ROOT/usr/local/bin/dib-run-parts
|
||||||
|
@ -40,3 +40,10 @@ _BASE_ELEMENT_DIR=$_PREFIX/elements
|
|||||||
ELEMENTS_PATH=${ELEMENTS_PATH:+"$ELEMENTS_PATH:$_BASE_ELEMENT_DIR"}
|
ELEMENTS_PATH=${ELEMENTS_PATH:+"$ELEMENTS_PATH:$_BASE_ELEMENT_DIR"}
|
||||||
export ELEMENTS_PATH=${ELEMENTS_PATH:-$_BASE_ELEMENT_DIR}
|
export ELEMENTS_PATH=${ELEMENTS_PATH:-$_BASE_ELEMENT_DIR}
|
||||||
export DIB_OFFLINE=${DIB_OFFLINE:-''}
|
export DIB_OFFLINE=${DIB_OFFLINE:-''}
|
||||||
|
|
||||||
|
# /sbin and friends aren't automatically included in $PATH when running sudo
|
||||||
|
# on SUSE Linux which breaks various pieces of this script in exciting ways,
|
||||||
|
# so inject them into the current $PATH if they're not there.
|
||||||
|
if ! [[ "$PATH" =~ "/sbin" ]] ; then
|
||||||
|
export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
|
||||||
|
fi
|
||||||
|
@ -155,7 +155,7 @@ function run_d() {
|
|||||||
check_element
|
check_element
|
||||||
check_break before-$1 bash
|
check_break before-$1 bash
|
||||||
if [ -d ${TMP_HOOKS_PATH}/$1.d ] ; then
|
if [ -d ${TMP_HOOKS_PATH}/$1.d ] ; then
|
||||||
run-parts ${TMP_HOOKS_PATH}/$1.d
|
${SCRIPT_HOME}/dib-run-parts ${TMP_HOOKS_PATH}/$1.d
|
||||||
fi
|
fi
|
||||||
check_break after-$1 bash
|
check_break after-$1 bash
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user