summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2019-09-18 14:34:51 +0200
committerJonathan Bauer2019-09-18 14:34:51 +0200
commit5a3f1d4723727c16f0535d35066e01f93dbfd3ca (patch)
treea3e031c76dd0afb29508706a7f890a62eda32aee
parentbuilds-initramfs.sh: improve modules.d handling (diff)
downloadsystemd-init-5a3f1d4723727c16f0535d35066e01f93dbfd3ca.tar.gz
systemd-init-5a3f1d4723727c16f0535d35066e01f93dbfd3ca.tar.xz
systemd-init-5a3f1d4723727c16f0535d35066e01f93dbfd3ca.zip
build-initramfs.sh: remove 'in-target' stuff
-rwxr-xr-xbuilder/build-initramfs.sh59
1 files changed, 0 insertions, 59 deletions
diff --git a/builder/build-initramfs.sh b/builder/build-initramfs.sh
index fe5786ec..8825eacb 100755
--- a/builder/build-initramfs.sh
+++ b/builder/build-initramfs.sh
@@ -575,65 +575,6 @@ main() {
[ -n "$qcow_handler" ] && logging.info " * qcow2 handler: $qcow_handler"
# endregion
- # region handle delegated operations to specified target
- if [[ "$target" != '' ]]; then
- _target="$target"
- if [[ -f "$target" ]]; then
- _target="$(mktemp --directory)"
- _xmount_mountpoint_target="$(mktemp --directory)"
- xmount --in qemu "$target" --out raw "$_xmount_mountpoint_target"
- _xmount_device_target="$(losetup --find)"
- losetup --partscan "$_xmount_device_target" \
- "${_xmount_mountpoint_target}/"*.dd
- # TODO Use partscan
- mount "$_xmount_device_target" "$_target"
- fi
- if [[ -d "$_target" ]]; then
- _temporary_working_directory="$(chroot "$_target" mktemp --directory)"
- mount --bind "$(pwd)" "${_target}${_temporary_working_directory}"
- _parameter_skip=false
- _parameter_to_forward=()
- for _parameter; do
- if $_parameter_skip; then
- _parameter_skip=false
- elif [[ "$_parameter" == '-t' ]] || \
- [[ "$_parameter" == '--target' ]]; then
- _parameter_skip=true
- else
- _parameter_to_forward+=("$_parameter")
- fi
- done
- # NOTE: We would have to temporary patch dracut to avoid removing the
- # environment variables "LD_LIBRARY_PATH" and "LD_PRELOAD" to get
- # "fakechroot" working with dracut. So we should remove this variables
- # before running the patched dracut version to follow the initial
- # intention. You should first do:
- # >>> unset LD_LIBRARY_PATH
- # >>> unset LD_PRELOAD
- # and patch "dracut.sh" temporary to comment out:
- # >>> unset LD_LIBRARY_PATH
- # >>> unset LD_PRELOAD
- # To avoid to broke the "fakechroot" environment pipe the ldconfig call
- # to the native one:
- # >>> FAKECHROOT_CMD_SUBST=/usr/bin/ldconfig=/usr/bin/ldconfig
- # shellcheck disable=SC2086
- change_root "${_target}" \
- "${_temporary_working_directory}/${BASH_SOURCE[0]}" \
- ${_parameter_to_forward[*]}
- mv "${_target}/$file_path" "$file_path"
- # Do cleanup procedures.
- umount "${_target}${_temporary_working_directory}"
- rm --recursive --force "${_target}${_temporary_working_directory}"
- if [[ -f "$target" ]]; then
- umount "$_target"
- losetup --detach "$_xmount_device_target"
- umount "$_xmount_mountpoint_target"
- rm --recursive --force "$_target" "$_xmount_mountpoint_target"
- fi
- fi
- exit 0
- fi
- # endregion
# region handle '--update' to update all the modules in 'modules.d'
if [ "$update" == "yes" ]; then
pushd "${_repo_dir}"