summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2022-03-02 17:09:32 +0100
committerJonathan Bauer2022-03-02 17:09:32 +0100
commit07b990d3542386c0855b6e71da8cc8775bd09b0f (patch)
tree97dd0b70e7b6e27ee755d991cb8de7eca3bd4eb0
parentbuild-initramfs.sh: fix error parsing whitespace as unknown arguments (diff)
downloadsystemd-init-07b990d3542386c0855b6e71da8cc8775bd09b0f.tar.gz
systemd-init-07b990d3542386c0855b6e71da8cc8775bd09b0f.tar.xz
systemd-init-07b990d3542386c0855b6e71da8cc8775bd09b0f.zip
Revert "build-initramfs.sh: fix error parsing whitespace as unknown arguments"
This reverts commit 97b2f81875c15e59958d4bd40322a016c4e91652.
-rwxr-xr-xbuild-initramfs.sh82
1 files changed, 29 insertions, 53 deletions
diff --git a/build-initramfs.sh b/build-initramfs.sh
index 498e8f07..f6c54ce0 100755
--- a/build-initramfs.sh
+++ b/build-initramfs.sh
@@ -43,7 +43,7 @@ declare -A core_repo=(
[handler]="git"
[path]="$_repo_dir"
[url]="git://git.openslx.org/openslx-ng/systemd-init.git"
- [branch]="downloader"
+ [branch]="downloader-cmake-refactor"
)
declare -A core_dracut=(
@@ -56,38 +56,27 @@ declare -A module_dnbd3=(
[handler]="git"
[path]="${_repo_dir}/modules.d/dnbd3-rootfs/binaries/dnbd3"
[url]="git://git.openslx.org/dnbd3.git"
- [branch]="master"
- [commit]="c881c79"
+ [branch]="workqueue"
)
-declare -A module_qemu_xmount=(
+declare -A module_xloop=(
[handler]="git"
+ [path]="${_repo_dir}/modules.d/dnbd3-rootfs/binaries/xloop"
+ [url]="git://git.openslx.org/openslx-ng/xloop.git"
+)
+
+declare -A module_qemu_xmount=(
+ [handler]="http"
[path]="${_repo_dir}/modules.d/dnbd3-rootfs/binaries/qemu-xmount"
- [url]="git://github.com/eaas-framework/qemu.git"
- [branch]="libxmount_input"
- [commit]="4873cd023da8511ed9792a318d1456c949046123"
+ [url]="https://github.com/eaas-framework/qemu/tarball/4873cd023da8511ed9792a318d1456c949046123"
)
declare -A module_xmount=(
- [handler]="git"
+ [handler]="http"
[path]="${_repo_dir}/modules.d/dnbd3-rootfs/binaries/xmount"
- [url]="git://github.com/eaas-framework/xmount.git"
- [branch]="master"
- [commit]="0151375"
-)
-
-declare -A module_kernel_qcow2_linux=(
- [handler]="git"
- [url]="git://git.openslx.org/openslx-ng/xloop.git"
- [path]="${_repo_dir}/modules.d/dnbd3-rootfs/binaries/xloop"
+ [url]="https://github.com/eaas-framework/xmount/tarball/015137556fce1e21273f198ae0b9158157f74f74"
)
-declare -A module_kernel_qcow2_util_linux=(
- [handler]="git"
- [url]="git://git.openslx.org/openslx/kernel-qcow2-util-linux.git"
- [path]="${_repo_dir}/modules.d/dnbd3-rootfs/binaries/kernel-qcow2-util-linux"
- [branch]="xloop-hack"
-)
declare -A override
@@ -113,6 +102,17 @@ bootstrap() {
fi
echo "######################### $module #########################"
if [ -n "${override["$module"]}" ]; then
+ echo "Module overriden: ${override["$module"]}"
+ IFS='|' read -r -a pairs <<< "${override["$module"]}"
+ declare -p pairs
+ for pair in "${pairs[@]}"; do
+ IFS='=' read -r key value <<< "$pair"
+ _ref["$key"]="$value"
+ done
+ fi
+ echo "Handler: ${_ref[handler]}"
+ echo " URL: ${_ref[url]}"
+ echo " Branch: ${_ref[branch]}"
echo " Commit: ${_ref[commit]}"
echo " Path: ${_ref[path]}"
@@ -316,12 +316,9 @@ parse_command_line() {
break
;;
*)
- if [ -n "$1" ]; then
- echo \
- "Error with given option \"$1\": This argument is not available."
- return 1
- fi
- ;;
+ echo \
+ "Error with given option \"$1\": This argument is not available."
+ return 1
esac
shift
done
@@ -420,30 +417,6 @@ main() {
fi
echo 'Checking dracut...'
- kernel_version="$(uname -r)"
- fi
- echo " * kernel version: $kernel_version"
- # similar for kernel headers needed to compile dnbd3 against.
- if [ -z "$kernel_headers" ]; then
- kernel_headers="/lib/modules/${kernel_version}/build"
- fi
- if [ ! -f "${kernel_headers}/Makefile" ]; then
- echo 'Missing kernel headers for given kernel!'
- exit 1
- fi
- echo " * kernel headers: $kernel_headers"
- if [ -n "$qcow_handler" ]; then
- echo " * qcow2 handler: $qcow_handler"
- export qcow_handler
- fi
-
- if [ "$update" = "yes" ]; then
- pushd "${_repo_dir}" || exit 1
- git pull
- popd || exit 1
- fi
-
- echo 'Checking dracut...'
if [ ! -f "${_dracut_dir}/dracut-install" ]; then
echo "Dracut isn't available yet loading it."
initialize_dracut
@@ -508,6 +481,9 @@ main() {
exit 0
fi
+ # ask password shice wegkloppen
+ sed -i '/systemd-ask-password/d' "${_dracut_dir}/modules.d/00systemd/module-setup.sh"
+
echo 'Building initramfs...'
"${_dracut_dir}/dracut.sh" --local \
--modules "${dracut_modules[*]}" --conf /etc/dracut.conf \