summaryrefslogtreecommitdiffstats
path: root/builder
diff options
context:
space:
mode:
authorThiago Abdo2019-11-08 14:49:27 +0100
committerThiago Abdo2019-11-08 14:49:27 +0100
commit336f396b824acd2d13d22c991259231b11223784 (patch)
tree45ab865148bb620a0032220d1e536924b5e4b68c /builder
parentedit build-initramfs.sh so it should be executed from inside the repo (diff)
downloadsystemd-init-336f396b824acd2d13d22c991259231b11223784.tar.gz
systemd-init-336f396b824acd2d13d22c991259231b11223784.tar.xz
systemd-init-336f396b824acd2d13d22c991259231b11223784.zip
Should not download dracut, dowloader scripts is doing it now
Signed-off-by: Thiago Abdo <tjabdo@inf.ufpr.br>
Diffstat (limited to 'builder')
-rwxr-xr-xbuilder/build-initramfs.sh42
1 files changed, 13 insertions, 29 deletions
diff --git a/builder/build-initramfs.sh b/builder/build-initramfs.sh
index f44f438c..d1a8017f 100755
--- a/builder/build-initramfs.sh
+++ b/builder/build-initramfs.sh
@@ -142,35 +142,19 @@ parse_command_line() {
## endregion
## region helper
initialize_dracut() {
- # First check what version to get
- # Autodetect the kmod version present on the system to decide which dracut version to get
- # * v47 requires kmod >= 23 (Available in Ubuntu 18.04)
- # * v46 works with kmod == 20 (CentOS 7.5 only provides kmod v20)
- if [ "$(pkg-config --modversion libkmod)" -ge 23 ]; then
- dracut_version="047"
- else
- dracut_version="046"
- fi
- dracut_resource_url="https://www.kernel.org/pub/linux/utils/boot/dracut/dracut-$dracut_version.tar.gz"
- if [[ ! -f "${_root_dir}/dracut/install/dracut-install" ]]; then
- mkdir --parents "${_root_dir}/dracut"
- echo "Download and extract dracut version $dracut_version"
- curl --location "$dracut_resource_url" | tar --extract --gzip \
- --directory "${_root_dir}/dracut" --strip-components 1
- pushd "${_root_dir}/dracut"
- # NOTE: On virtualbox shared folder symlinks are not allowed.
- # NOTE: make the dracut-install binary (dracut-install resolves
- # dependencies etc.)
- echo 'Compiling dracut.'
- ./configure
- make install/dracut-install
- # NOTE: We have to copy the binary to current instead of symlinking
- # them since this feature isn't supported in shared virtual box machine
- # folders.
- # If symlinks would be available we could simply use:
- # >>> make dracut-install
- popd
- fi
+ pushd "${_root_dir}/dracut"
+ # NOTE: On virtualbox shared folder symlinks are not allowed.
+ # NOTE: make the dracut-install binary (dracut-install resolves
+ # dependencies etc.)
+ echo 'Compiling dracut.'
+ ./configure
+ make install/dracut-install
+ # NOTE: We have to copy the binary to current instead of symlinking
+ # them since this feature isn't supported in shared virtual box machine
+ # folders.
+ # If symlinks would be available we could simply use:
+ # >>> make dracut-install
+ popd
cp "${_root_dir}/dracut/install/dracut-install" \
"${_root_dir}/dracut/dracut-install"
return $?