Compare commits

...

19 Commits
054 ... 055

Author SHA1 Message Date
Harald Hoyer
86bf2533d7 docs: update NEWS.md and AUTHORS 2021-05-27 14:34:19 +02:00
Tomasz Paweł Gajc
12beeac741 fix(fs-lib): install fsck utilities 2021-05-27 09:13:04 +02:00
Stefan Berger
b12d91c431 fix(integrity): require ALLOW_METADATA_WRITES to come from EVM config file
Upcoming versions of EVM will not require the ALLOW_METADATA_WRITES anymore,
therefore we remove it from the script and require it to be set in the EVM
config file variable EVM_ACTIVATION_BITS for those versions that need it.

Patch 9 in this patch set deprecates the EVM_ALLOW_METADATA_WRITES flag:
https://lore.kernel.org/linux-integrity/20210514152753.982958-1-roberto.sassu@huawei.com/

Suggested-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-05-26 17:11:07 +02:00
Marcos Mello
5eb24aa21d fix(install): configure logging earlier
There are log_error() and log_debug() calls in parse_argv().
2021-05-26 09:22:09 +02:00
Jóhann B. Guðmundsson
7d205598c6 fix(warpclock): minor cleanups
- Removing shell mode lines
- Remove uncessary file requirements
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-25 14:00:52 +02:00
Jóhann B. Guðmundsson
f4ea5f8734 fix(dash): minor cleanups
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-25 11:59:08 +00:00
Jóhann B. Guðmundsson
6c673298f3 fix(mksh): minor cleanups
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-25 11:58:43 +00:00
Marcos Mello
4cb086fa29 feat(install): add default value for --firmwaredirs
If not specified, use /lib/firmware.
2021-05-25 11:48:59 +02:00
Harald Hoyer
a277a5fc7a fix(dracut-functions): get_maj_min without get_maj_min_cache_file set
If `get_maj_min_cache_file` is unset `get_maj_min()` would error out.

Fix it to work without a cache file set.
2021-05-21 14:17:07 +02:00
Harald Hoyer
0a6007bf4f fix(dracut): pipe hardlink output to dinfo
Otherwise the output is cluttered with:
```
Mode:           real
Files:          1364
Linked:         5 files
Compared:       0 xattrs
Compared:       384 files
Saved:          12.84 KiB
Duration:       0.052674 seconds
```
2021-05-21 14:16:43 +02:00
Marcos Mello
c1ab36139d fix(install): sane default --kerneldir
If --kerneldir is not specified, use /lib/modules/$(uname -r).

Fixes #1505
2021-05-20 23:56:40 +00:00
Jóhann B. Guðmundsson
9355cb8ea5 fix(bash): minor cleanups
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-19 10:29:34 +00:00
Kairui Song
636d6df313 fix(squash): don't mount the mount points if already mounted
It is possible that user setup some early mount in the rootfs even
earlier, so just be more robust and cover that case too.

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-05-19 08:46:34 +00:00
Harald Hoyer
fa63c9be13 ci: add shfmt to Fedora containers 2021-05-18 11:33:27 +02:00
Harald Hoyer
148e420be5 fix(base): add missing str_replace to dracut-dev-lib.sh
```
dracut-dev-lib.sh: line 92: str_replace: command not found
dracut-dev-lib.sh: line 98: /var/tmp/dracut.sabKZg/initramfs/initqueue/finished/devexists-.sh: No such file or directory
dracut-dev-lib.sh: line 83: /var/tmp/dracut.sabKZg/initramfs/emergency/80-.sh: No such file or directory
```
2021-05-18 11:31:16 +02:00
Harald Hoyer
7275c6f6a0 feat(dracut.sh): detect running in a container
Don't try to `mknod` by setting DRACUT_NO_MKNOD.
Don't try to `cp` extended attributrs by setting DRACUT_NO_XATTR.
2021-05-17 16:23:00 +02:00
Harald Hoyer
c08bc8109d fix(base): split out dracut-dev-lib.sh
To share the `wait_for_dev` function and use it without side effects on
install time, split out the needed functions in an extra library.
2021-05-17 16:22:49 +02:00
Lars Wendler
b9b6f0ee5b fix(dracut-util): print error message with trailing newline
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
2021-05-14 15:48:32 +00:00
Jóhann B. Guðmundsson
f634448b29 fix(packit): downstream has renamed the master branch to main 2021-05-14 15:50:38 +02:00
41 changed files with 366 additions and 209 deletions

View File

@@ -33,7 +33,7 @@ jobs:
- job: propose_downstream
trigger: release
metadata:
dist_git_branches: master
dist_git_branches: main
- job: tests
trigger: pull_request

View File

@@ -4,8 +4,8 @@ Jóhann B. Guðmundsson <johannbg@gmail.com>
Amadeusz Żołnowski <aidecoe@aidecoe.name>
Daniel Molkentin <daniel.molkentin@suse.com>
Hannes Reinecke <hare@suse.com>
Will Woods <wwoods@redhat.com>
Kairui Song <kasong@redhat.com>
Will Woods <wwoods@redhat.com>
Philippe Seewer <philippe.seewer@bfh.ch>
Warren Togami <wtogami@redhat.com>
Dave Young <dyoung@redhat.com>
@@ -31,12 +31,12 @@ Andreas Thienemann <andreas@bawue.net>
Frantisek Sumsal <frantisek@sumsal.cz>
Fabian Vogt <fvogt@suse.com>
Nicolas Chauvet <kwizart@gmail.com>
Tomasz Paweł Gajc <tpgxyz@gmail.com>
Zoltán Böszörményi <zboszor@pr.hu>
Beniamino Galvani <bgalvani@redhat.com>
Colin Walters <walters@verbum.org>
John Reiser <jreiser@bitwagon.com>
Luca Berra <bluca@vodka.it>
Tomasz Paweł Gajc <tpgxyz@gmail.com>
Xunlei Pang <xlpang@redhat.com>
Brian C. Lane <bcl@redhat.com>
Daniel Drake <drake@endlessm.com>
@@ -55,6 +55,7 @@ David Tardon <dtardon@redhat.com>
Dusty Mabe <dusty@dustymabe.com>
Jonas Witschel <diabonas@gmx.de>
Leho Kraav <leho@kraav.com>
Marcos Mello <marcosfrm@gmail.com>
Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Moritz Maxeiner <moritz@ucworks.org>
Nathan Rini <nate@ucar.edu>
@@ -94,7 +95,6 @@ Jiri Konecny <jkonecny@redhat.com>
Jon Ander Hernandez <jonan.h@gmail.com>
Juan RP <xtraeme@gmail.com>
Lance Albertson <lance@osuosl.org>
Marcos Mello <marcosfrm@gmail.com>
Marian Ganisin <mganisin@redhat.com>
Matthias Gerstner <matthias.gerstner@suse.de>
Max Resch <resch.max@gmail.com>
@@ -148,6 +148,7 @@ Pingfan Liu <piliu@redhat.com>
Przemysław Rudy <prudy1@o2.pl>
Robert LeBlanc <robert@leblancnet.us>
Robert Scheck <robert@fedoraproject.org>
Stefan Berger <stefanb@linux.ibm.com>
Stefan Berger <stefanb@us.ibm.com>
Thomas Lange <lange@informatik.uni-koeln.de>
Till Maas <opensource@till.name>
@@ -231,6 +232,7 @@ Jonas Jonsson <jonas@websystem.se>
Jonas Witschel <diabonas@archlinux.org>
Kevin Yung <Kevin.Yung@myob.com>
Lars R. Damerow <lars@pixar.com>
Lars Wendler <polynomial-c@gentoo.org>
Lee Duncan <lduncan@suse.com>
Lennart Poettering <lennart@poettering.net>
Lennert Buytenhek <buytenh@wantstofly.org>
@@ -279,7 +281,6 @@ Sergei Iudin <tsipa740@gmail.com>
Sergey Fionov <fionov@gmail.com>
Shawn W Dunn <sfalken@opensuse.org>
Srinivasa T N <seenutn@linux.vnet.ibm.com>
Stefan Berger <stefanb@linux.ibm.com>
Stijn Hoop <stijn@sandcat.nl>
Sullivan (CTR), Austin <austin.sullivan.ctr@progeny.net>
Thierry Vignaud <thierry.vignaud@gmail.com>

37
NEWS.md
View File

@@ -1,5 +1,42 @@
[Rendered view](https://github.com/dracutdevs/dracut/blob/master/NEWS.md)
dracut-055
==========
#### Bug Fixes
* **base:**
* add missing `str_replace` to `dracut-dev-lib.sh` ([148e420b](https://github.com/dracutdevs/dracut/commit/148e420be5b5809aa8d5033f47477573bbbf3e60))
* split out `dracut-dev-lib.sh` ([c08bc810](https://github.com/dracutdevs/dracut/commit/c08bc8109d4c43beacfa4bcdc20a356102da6d02))
* **bash:** minor cleanups ([9355cb8e](https://github.com/dracutdevs/dracut/commit/9355cb8ea5024533210067373657dc337d63ecb9))
* **dash:** minor cleanups ([f4ea5f87](https://github.com/dracutdevs/dracut/commit/f4ea5f8734c4636f7d6db78da76e9525beb9a0ac))
* **dracut:** pipe hardlink output to `dinfo` ([0a6007bf](https://github.com/dracutdevs/dracut/commit/0a6007bf4f472565d2c0c205a56edea7ba3e3bc3))
* **dracut-functions:** get_maj_min without get_maj_min_cache_file set ([a277a5fc](https://github.com/dracutdevs/dracut/commit/a277a5fc7acc0a9e8d853f09671495f9d27645c1))
* **dracut-util:** print error message with trailing newline ([b9b6f0ee](https://github.com/dracutdevs/dracut/commit/b9b6f0ee5b859a562e46a8c4e0dee0261fabf74d))
* **fs-lib:** install fsck utilities ([12beeac7](https://github.com/dracutdevs/dracut/commit/12beeac741e4429146a674ef4ea9aa0bac10364b))
* **install:**
* configure logging earlier ([5eb24aa2](https://github.com/dracutdevs/dracut/commit/5eb24aa21d3ee639f869c2e363b3fb0b98be552b))
* sane default --kerneldir ([c1ab3613](https://github.com/dracutdevs/dracut/commit/c1ab36139d416e580e768c29f2addf7ccbc2c612), closes [#1505](https://github.com/dracutdevs/dracut/issues/1505))
* **integrity:** require ALLOW_METADATA_WRITES to come from EVM config file ([b12d91c4](https://github.com/dracutdevs/dracut/commit/b12d91c431220488fecf7b4be82427e3560560cb))
* **mksh:** minor cleanups ([6c673298](https://github.com/dracutdevs/dracut/commit/6c673298f36990665467564e6114c9ca2530f584))
* **squash:** don't mount the mount points if already mounted ([636d6df3](https://github.com/dracutdevs/dracut/commit/636d6df3134dde1dac72241937724bc59deb9303))
* **warpclock:** minor cleanups ([7d205598](https://github.com/dracutdevs/dracut/commit/7d205598c6a500b58b4d328e824d0446276f7ced))
#### Features
* **dracut.sh:** detect running in a container ([7275c6f6](https://github.com/dracutdevs/dracut/commit/7275c6f6a0f6808cd939ea5bdf1244c7bd13ba44))
* **install:** add default value for --firmwaredirs ([4cb086fa](https://github.com/dracutdevs/dracut/commit/4cb086fa2995799b95c0b25bc9a0cf72ba3868ea))
#### Contributors
- Harald Hoyer <harald@redhat.com>
- Jóhann B. Guðmundsson <johannbg@gmail.com>
- Marcos Mello <marcosfrm@gmail.com>
- Kairui Song <kasong@redhat.com>
- Lars Wendler <polynomial-c@gentoo.org>
- Stefan Berger <stefanb@linux.ibm.com>
- Tomasz Paweł Gajc <tpgxyz@gmail.com>
dracut-054
==========

View File

@@ -234,13 +234,20 @@ get_fs_env() {
# 8:2
get_maj_min() {
local _majmin
out="$(grep -m1 -oP "^$1 \K\S+$" "${get_maj_min_cache_file:?}")"
if [ -z "$out" ]; then
_majmin="$(stat -L -c '%t:%T' "$1" 2> /dev/null)"
out="$(printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))")"
echo "$1 $out" >> "${get_maj_min_cache_file:?}"
local _out
if [[ $get_maj_min_cache_file ]]; then
_out="$(grep -m1 -oP "^$1 \K\S+$" "$get_maj_min_cache_file")"
fi
echo -n "$out"
if ! [[ "$_out" ]]; then
_majmin="$(stat -L -c '%t:%T' "$1" 2> /dev/null)"
_out="$(printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))")"
if [[ $get_maj_min_cache_file ]]; then
echo "$1 $_out" >> "$get_maj_min_cache_file"
fi
fi
echo -n "$_out"
}
# get_devpath_block <device>

View File

@@ -1171,6 +1171,13 @@ if [[ -f $dracutbasedir/dracut-version.sh ]]; then
. "$dracutbasedir"/dracut-version.sh
fi
if systemd-detect-virt -c &> /dev/null; then
export DRACUT_NO_MKNOD=1 DRACUT_NO_XATTR=1
if [[ $hostonly ]]; then
printf "%s\n" "dracut: WARNING: running in hostonly mode in a container!!"
fi
fi
if [[ -f $dracutbasedir/dracut-init.sh ]]; then
# shellcheck source=./dracut-init.sh
. "$dracutbasedir"/dracut-init.sh
@@ -1888,7 +1895,7 @@ if [[ $kernel_only != yes ]]; then
# shellcheck disable=SC2174
mkdir -m 0755 -p "${initdir}/lib/dracut/hooks/$_d"
done
if [[ $EUID == "0" ]]; then
if [[ $EUID == "0" ]] && ! [[ $DRACUT_NO_MKNOD ]]; then
[[ -c ${initdir}/dev/null ]] || mknod "${initdir}"/dev/null c 1 3
[[ -c ${initdir}/dev/kmsg ]] || mknod "${initdir}"/dev/kmsg c 1 11
[[ -c ${initdir}/dev/console ]] || mknod "${initdir}"/dev/console c 5 1
@@ -2085,7 +2092,7 @@ done
if [[ $do_hardlink == yes ]] && command -v hardlink > /dev/null; then
dinfo "*** Hardlinking files ***"
hardlink "$initdir" 2>&1
hardlink "$initdir" 2>&1 | dinfo
dinfo "*** Hardlinking files done ***"
fi

View File

@@ -1,20 +1,32 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# called by dracut
# Prerequisite check(s) for module.
check() {
require_binaries /bin/bash
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries bash || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# called by dracut
# Module dependency requirements.
depends() {
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# called by dracut
# Install the required file(s) and directories for the module in the initramfs.
install() {
# If another shell is already installed, do not use bash
[[ -x $initdir/bin/sh ]] && return
# Prefer bash as /bin/sh if it is available.
inst /bin/bash && ln -sf bash "${initdir}/bin/sh"
inst /bin/bash
# Prefer bash as default shell if no other shell is preferred.
[[ -L $initdir/bin/sh ]] || ln -sf bash "${initdir}/bin/sh"
}

View File

@@ -1,20 +1,32 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# called by dracut
# Prerequisite check(s) for module.
check() {
require_binaries /bin/dash
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries dash || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# called by dracut
# Module dependency requirements.
depends() {
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# called by dracut
# Install the required file(s) and directories for the module in the initramfs.
install() {
# If another shell is already installed, do not use dash
[[ -x $initdir/bin/sh ]] && return
# Prefer dash as /bin/sh if it is available.
inst /bin/dash && ln -sf dash "${initdir}/bin/sh"
inst /bin/dash
# Prefer dash as default shell if no other shell is preferred.
[[ -L $initdir/bin/sh ]] || ln -sf dash "${initdir}/bin/sh"
}

View File

@@ -1,20 +1,32 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# called by dracut
# Prerequisite check(s) for module.
check() {
require_binaries /bin/mksh
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries mksh || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# called by dracut
# Module dependency requirements.
depends() {
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# called by dracut
# Install the required file(s) and directories for the module in the initramfs.
install() {
# If another shell is already installed, do not use mksh
[[ -x $initdir/bin/sh ]] && return
# Prefer mksh as /bin/sh if it is available.
inst /bin/mksh && ln -sf mksh "${initdir}/bin/sh"
inst /bin/mksh
# Prefer mksh as default shell if no other shell is preferred.
[[ -L $initdir/bin/sh ]] || ln -sf mksh "${initdir}/bin/sh"
}

View File

@@ -1,29 +1,39 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# called by dracut
# Prerequisite check(s) for module.
check() {
# hwclock does not exist on S390(x), bail out silently then
local _arch=${DRACUT_ARCH:-$(uname -m)}
[ "$_arch" = "s390" -o "$_arch" = "s390x" ] && return 1
[ -e /etc/localtime -a -e /etc/adjtime ] || return 1
require_binaries /sbin/hwclock || return 1
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries hwclock || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# called by dracut
# Module dependency requirements.
depends() {
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# called by dracut
# Install the required file(s) and directories for the module in the initramfs.
install() {
inst /usr/share/zoneinfo/UTC
inst /etc/localtime
inst /etc/adjtime
inst_hook pre-trigger 00 "$moddir/warpclock.sh"
inst /sbin/hwclock
inst_multiple -o \
/usr/share/zoneinfo/UTC \
/etc/localtime \
/etc/adjtime \
hwclock
}

View File

@@ -1,4 +1,9 @@
#!/bin/sh
# This file is part of dracut warpclock module.
# SPDX-License-Identifier: GPL-2.0-or-later
# Set the kernel's timezone and reset the system time
# if adjtime is set to LOCAL.
if test -e /etc/adjtime; then
while read -r line; do

View File

@@ -17,7 +17,7 @@ EVM_ACTIVATION_BITS=0
# EVMKEY: path to the symmetric key; defaults to /etc/keys/evm-trusted.blob
# EVMKEYDESC: Description of the symmetric key; default is 'evm-key'
# EVMKEYTYPE: Type of the symmetric key; default is 'encrypted'
# EMX509: path to x509 cert; default is /etc/keys/x509_evm.der
# EVMX509: path to x509 cert; default is /etc/keys/x509_evm.der
# EVM_ACTIVATION_BITS: additional EVM activation bits, such as
# EVM_SETUP_COMPLETE; default is 0
@@ -131,7 +131,7 @@ enable_evm() {
fi
local evm_configured=0
local EVM_INIT_HMAC=1 EVM_INIT_X509=2 EVM_ALLOW_METADATA_WRITES=4
local EVM_INIT_HMAC=1 EVM_INIT_X509=2
# try to load the EVM encrypted key
load_evm_key && evm_configured=${EVM_INIT_HMAC}
@@ -146,14 +146,7 @@ enable_evm() {
# initialize EVM
info "Enabling EVM"
if [ "$((evm_configured & EVM_INIT_X509))" -ne 0 ]; then
# Older kernels did not support EVM_ALLOW_METADATA_WRITES, try for
# newer ones first that need it when an x509 is used
echo $((evm_configured | EVM_ALLOW_METADATA_WRITES | EVM_ACTIVATION_BITS)) > "${EVMSECFILE}" \
|| echo $((evm_configured | EVM_ACTIVATION_BITS)) > "${EVMSECFILE}"
else
echo $((evm_configured | EVM_ACTIVATION_BITS)) > "${EVMSECFILE}"
fi
echo $((evm_configured | EVM_ACTIVATION_BITS)) > "${EVMSECFILE}"
if [ "$((evm_configured & EVM_INIT_HMAC))" -ne 0 ]; then
# unload the EVM encrypted key

View File

@@ -0,0 +1,139 @@
#!/bin/sh
# replaces all occurrences of 'search' in 'str' with 'replacement'
#
# str_replace str search replacement
#
# example:
# str_replace ' one two three ' ' ' '_'
str_replace() {
local in="$1"
local s="$2"
local r="$3"
local out=''
while [ "${in##*"$s"*}" != "$in" ]; do
chop="${in%%"$s"*}"
out="${out}${chop}$r"
in="${in#*"$s"}"
done
echo "${out}${in}"
}
# get a systemd-compatible unit name from a path
# (mimicks unit_name_from_path_instance())
dev_unit_name() {
local dev="$1"
if command -v systemd-escape > /dev/null; then
systemd-escape -p -- "$dev"
return $?
fi
if [ "$dev" = "/" -o -z "$dev" ]; then
printf -- "-"
return 0
fi
dev="${1%%/}"
dev="${dev##/}"
# shellcheck disable=SC1003
dev="$(str_replace "$dev" '\' '\x5c')"
dev="$(str_replace "$dev" '-' '\x2d')"
if [ "${dev##.}" != "$dev" ]; then
dev="\x2e${dev##.}"
fi
dev="$(str_replace "$dev" '/' '-')"
printf -- "%s" "$dev"
}
# set_systemd_timeout_for_dev [-n] <dev> [<timeout>]
# Set 'rd.timeout' as the systemd timeout for <dev>
set_systemd_timeout_for_dev() {
local _name
local _needreload
local _noreload
local _timeout
[ -z "$DRACUT_SYSTEMD" ] && return 0
if [ "$1" = "-n" ]; then
_noreload=1
shift
fi
if [ -n "$2" ]; then
_timeout="$2"
else
_timeout=$(getarg rd.timeout)
fi
_timeout=${_timeout:-0}
_name=$(dev_unit_name "$1")
if ! [ -L "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device" ]; then
[ -d "${PREFIX}"/etc/systemd/system/initrd.target.wants ] || mkdir -p "${PREFIX}"/etc/systemd/system/initrd.target.wants
ln -s ../"${_name}".device "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device"
type mark_hostonly > /dev/null 2>&1 && mark_hostonly /etc/systemd/system/initrd.target.wants/"${_name}".device
_needreload=1
fi
if ! [ -f "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf" ]; then
mkdir -p "${PREFIX}/etc/systemd/system/${_name}.device.d"
{
echo "[Unit]"
echo "JobTimeoutSec=$_timeout"
echo "JobRunningTimeoutSec=$_timeout"
} > "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf"
type mark_hostonly > /dev/null 2>&1 && mark_hostonly /etc/systemd/system/"${_name}".device.d/timeout.conf
_needreload=1
fi
if [ -z "$PREFIX" ] && [ "$_needreload" = 1 ] && [ -z "$_noreload" ]; then
/sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
fi
}
# wait_for_dev <dev> [<timeout>]
#
# Installs a initqueue-finished script,
# which will cause the main loop only to exit,
# if the device <dev> is recognized by the system.
wait_for_dev() {
local _name
local _noreload
if [ "$1" = "-n" ]; then
_noreload=-n
shift
fi
_name="$(str_replace "$1" '/' '\x2f')"
type mark_hostonly > /dev/null 2>&1 && mark_hostonly "$hookdir/initqueue/finished/devexists-${_name}.sh"
[ -e "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0
printf '[ -e "%s" ]\n' "$1" \
>> "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh"
{
printf '[ -e "%s" ] || ' "$1"
printf 'warn "\"%s\" does not exist"\n' "$1"
} >> "${PREFIX}$hookdir/emergency/80-${_name}.sh"
set_systemd_timeout_for_dev $_noreload "$@"
}
cancel_wait_for_dev() {
local _name
_name="$(str_replace "$1" '/' '\x2f')"
rm -f -- "$hookdir/initqueue/finished/devexists-${_name}.sh"
rm -f -- "$hookdir/emergency/80-${_name}.sh"
if [ -n "$DRACUT_SYSTEMD" ]; then
_name=$(dev_unit_name "$1")
rm -f -- "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device"
rm -f -- "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf"
/sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
fi
}

View File

@@ -1,5 +1,7 @@
#!/bin/sh
type wait_for_dev > /dev/null 2>&1 || . /lib/dracut-dev-lib.sh
export DRACUT_SYSTEMD
export NEWROOT
if [ -n "$NEWROOT" ]; then
@@ -838,119 +840,6 @@ wait_for_mount() {
} >> "$hookdir/emergency/90-${_name}.sh"
}
# get a systemd-compatible unit name from a path
# (mimicks unit_name_from_path_instance())
dev_unit_name() {
local dev="$1"
if command -v systemd-escape > /dev/null; then
systemd-escape -p -- "$dev"
return
fi
if [ "$dev" = "/" -o -z "$dev" ]; then
printf -- "-"
exit 0
fi
dev="${1%%/}"
dev="${dev##/}"
# shellcheck disable=SC1003
dev="$(str_replace "$dev" '\' '\x5c')"
dev="$(str_replace "$dev" '-' '\x2d')"
if [ "${dev##.}" != "$dev" ]; then
dev="\x2e${dev##.}"
fi
dev="$(str_replace "$dev" '/' '-')"
printf -- "%s" "$dev"
}
# set_systemd_timeout_for_dev <dev>
# Set 'rd.timeout' as the systemd timeout for <dev>
set_systemd_timeout_for_dev() {
local _name
local _needreload
local _noreload
local _timeout
if [ "$1" = "-n" ]; then
_noreload=1
shift
fi
_timeout=$(getarg rd.timeout)
_timeout=${_timeout:-0}
if [ -n "$DRACUT_SYSTEMD" ]; then
_name=$(dev_unit_name "$1")
if ! [ -L "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device" ]; then
[ -d "${PREFIX}"/etc/systemd/system/initrd.target.wants ] || mkdir -p "${PREFIX}"/etc/systemd/system/initrd.target.wants
ln -s ../"${_name}".device "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device"
type mark_hostonly > /dev/null 2>&1 && mark_hostonly /etc/systemd/system/initrd.target.wants/"${_name}".device
_needreload=1
fi
if ! [ -f "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf" ]; then
mkdir -p "${PREFIX}/etc/systemd/system/${_name}.device.d"
{
echo "[Unit]"
echo "JobTimeoutSec=$_timeout"
echo "JobRunningTimeoutSec=$_timeout"
} > "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf"
type mark_hostonly > /dev/null 2>&1 && mark_hostonly /etc/systemd/system/"${_name}".device.d/timeout.conf
_needreload=1
fi
if [ -z "$PREFIX" ] && [ "$_needreload" = 1 ] && [ -z "$_noreload" ]; then
/sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
fi
fi
}
# wait_for_dev <dev>
#
# Installs a initqueue-finished script,
# which will cause the main loop only to exit,
# if the device <dev> is recognized by the system.
wait_for_dev() {
local _name
local _noreload
if [ "$1" = "-n" ]; then
_noreload=-n
shift
fi
_name="$(str_replace "$1" '/' '\x2f')"
type mark_hostonly > /dev/null 2>&1 && mark_hostonly "$hookdir/initqueue/finished/devexists-${_name}.sh"
[ -e "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0
printf '[ -e "%s" ]\n' "$1" \
>> "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh"
{
printf '[ -e "%s" ] || ' "$1"
printf 'warn "\"%s\" does not exist"\n' "$1"
} >> "${PREFIX}$hookdir/emergency/80-${_name}.sh"
set_systemd_timeout_for_dev $_noreload "$1"
}
cancel_wait_for_dev() {
local _name
_name="$(str_replace "$1" '/' '\x2f')"
rm -f -- "$hookdir/initqueue/finished/devexists-${_name}.sh"
rm -f -- "$hookdir/emergency/80-${_name}.sh"
if [ -n "$DRACUT_SYSTEMD" ]; then
_name=$(dev_unit_name "$1")
rm -f -- "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device"
rm -f -- "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf"
/sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
fi
}
killproc() {
debug_off
local _exe

View File

@@ -50,6 +50,7 @@ install() {
mkdir -p "${initdir}"/tmp
inst_simple "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "$moddir/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
mkdir -p "${initdir}"/var
if ! dracut_module_included "systemd"; then
@@ -116,11 +117,10 @@ install() {
export DRACUT_SYSTEMD=1
fi
export PREFIX="$initdir"
export hookdir=/lib/dracut/hooks
# suppress getarg for `rd.memdebug`
export DEBUG_MEM_LEVEL=0
# shellcheck source=dracut-lib.sh
. "$moddir/dracut-lib.sh"
# shellcheck source=dracut-dev-lib.sh
. "$moddir/dracut-dev-lib.sh"
for _dev in "${host_devs[@]}"; do
for _dev2 in "${root_devs[@]}"; do
@@ -137,7 +137,7 @@ install() {
_pdev=$(get_persistent_dev "$_dev")
case "$_pdev" in
/dev/?*) wait_for_dev "$_pdev" ;;
/dev/?*) wait_for_dev "$_pdev" 0 ;;
*) ;;
esac
done

View File

@@ -67,22 +67,23 @@ install() {
[[ $nofscks == "yes" ]] && return
if [[ $fscks == "${fscks#*[^ ]*}" ]]; then
_helpers="\
umount mount /sbin/fsck* /usr/sbin/fsck*
_helpers=(
/sbin/fsck* /usr/sbin/fsck*
xfs_db xfs_check xfs_repair xfs_metadump
e2fsck jfs_fsck reiserfsck btrfsck
"
)
if [[ $hostonly ]]; then
_helpers="umount mount "
_helpers+=$(for_each_host_dev_fs echo_fs_helper)
read -r -a _helpers < <(for_each_host_dev_fs echo_fs_helper)
fi
else
_helpers="$fscks"
read -r -a _helpers <<< "$fscks"
fi
if [[ $_helpers == *e2fsck* ]] && [[ -e $dracutsysrootdir/etc/e2fsck.conf ]]; then
_helpers+=(umount mount)
if [[ ${_helpers[*]} == *e2fsck* ]] && [[ -e $dracutsysrootdir/etc/e2fsck.conf ]]; then
inst_simple /etc/e2fsck.conf
fi
inst_multiple -o "$_helpers" fsck
inst_multiple -o "${_helpers[@]}" fsck
}

View File

@@ -1,12 +1,17 @@
#!/bin/sh
PATH=/bin:/sbin
# Basic mounts for mounting a squash image
mkdir /proc /sys /dev /run
mount -t proc -o nosuid,noexec,nodev proc /proc
mount -t sysfs -o nosuid,noexec,nodev sysfs /sys
mount -t devtmpfs -o mode=755,noexec,nosuid,strictatime devtmpfs /dev
mount -t tmpfs -o mode=755,nodev,nosuid,strictatime tmpfs /run
[ -e /proc/self/mounts ] \
|| (mkdir -p /proc && mount -t proc -o nosuid,noexec,nodev proc /proc)
grep -q '^sysfs /sys sysfs' /proc/self/mounts \
|| (mkdir -p /sys && mount -t sysfs -o nosuid,noexec,nodev sysfs /sys)
grep -q '^devtmpfs /dev devtmpfs' /proc/self/mounts \
|| (mkdir -p /dev && mount -t devtmpfs -o mode=755,noexec,nosuid,strictatime devtmpfs /dev)
grep -q '^tmpfs /run tmpfs' /proc/self/mounts \
|| (mkdir -p /run && mount -t tmpfs -o mode=755,noexec,nosuid,strictatime tmpfs /run)
# Load required modules
modprobe loop

View File

@@ -42,11 +42,11 @@ installpost() {
# Install required modules and binaries for the squash image init script.
if [[ $_busybox ]]; then
inst "$_busybox" /usr/bin/busybox
for _i in sh echo mount modprobe mkdir switch_root; do
for _i in sh echo mount modprobe mkdir switch_root grep; do
ln_r /usr/bin/busybox /usr/bin/$_i
done
else
DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root
DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root grep
fi
hostonly="" instmods "loop" "squashfs" "overlay"

View File

@@ -1004,7 +1004,9 @@ static void usage(int status)
"\n"
" --module,-m Install kernel modules, instead of files\n"
" --kerneldir Specify the kernel module directory\n"
" (default: /lib/modules/`uname -r`)\n"
" --firmwaredirs Specify the firmware directory search path with : separation\n"
" (default: DRACUT_FIRMWARE_PATH env var, /lib/firmware if not set)\n"
" --silent Don't display error messages for kernel module install\n"
" --modalias Only generate module list from /sys/devices modalias list\n"
" -o --optional If kernel module does not exist, do not fail\n"
@@ -1164,10 +1166,17 @@ static int parse_argv(int argc, char *argv[])
}
}
if (arg_loglevel >= 0) {
log_set_max_level(arg_loglevel);
}
if (!kerneldir) {
struct utsname buf;
uname(&buf);
kerneldir = strdup(buf.version);
if (asprintf(&kerneldir, "%s%s", "/lib/modules/", buf.release) < 0) {
log_error("Out of memory!");
exit(EXIT_FAILURE);
}
}
if (arg_modalias) {
@@ -1180,14 +1189,12 @@ static int parse_argv(int argc, char *argv[])
path = getenv("DRACUT_FIRMWARE_PATH");
if (path == NULL) {
log_error("Environment variable DRACUT_FIRMWARE_PATH is not set");
exit(EXIT_FAILURE);
if (path) {
log_debug("DRACUT_FIRMWARE_PATH=%s", path);
firmwaredirs = strv_split(path, ":");
} else {
firmwaredirs = strv_new("/lib/firmware", NULL);
}
log_debug("DRACUT_FIRMWARE_PATH=%s", path);
firmwaredirs = strv_split(path, ":");
}
}
@@ -1999,18 +2006,14 @@ int main(int argc, char **argv)
char *path = NULL;
char *env_no_xattr = NULL;
log_set_target(LOG_TARGET_CONSOLE);
log_parse_environment();
log_open();
r = parse_argv(argc, argv);
if (r <= 0)
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
log_set_target(LOG_TARGET_CONSOLE);
log_parse_environment();
if (arg_loglevel >= 0)
log_set_max_level(arg_loglevel);
log_open();
modules_loaded = hashmap_new(string_hash_func, string_compare_func);
if (arg_modalias) {
Iterator i;

View File

@@ -123,7 +123,7 @@ static void usage(enum EXEC_MODE enumExecMode, int ret, char *msg)
{
switch (enumExecMode) {
case UNDEFINED:
fprintf(stderr, "ERROR: 'dracut-util' has to be called via a symlink to the tool name.");
fprintf(stderr, "ERROR: 'dracut-util' has to be called via a symlink to the tool name.\n");
break;
case GETARG:
fprintf(stderr, "ERROR: %s\nUsage: dracut-getarg <KEY>[=[<VALUE>]]\n", msg);

View File

@@ -49,6 +49,7 @@ test_setup() {
inst "$basedir/modules.d/35network-legacy/ifup.sh" "/sbin/ifup"
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -48,6 +48,7 @@ test_setup() {
inst "$basedir/modules.d/35network-legacy/ifup.sh" "/sbin/ifup"
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -69,6 +69,7 @@ test_setup() {
inst "$basedir/modules.d/35network-legacy/ifup.sh" "/sbin/ifup"
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -93,6 +93,7 @@ test_setup() {
inst_multiple -o {,/usr}/lib/systemd/system/"dracut*"
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -46,6 +46,7 @@ test_setup() {
inst_multiple -o ${_terminfodir}/l/linux
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -50,6 +50,7 @@ test_setup() {
inst "$basedir/modules.d/35network-legacy/ifup.sh" "/sbin/ifup"
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -80,6 +80,7 @@ test_setup() {
inst "$basedir/modules.d/35network-legacy/ifup.sh" "/sbin/ifup"
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -78,6 +78,7 @@ test_setup() {
inst "$basedir/modules.d/35network-legacy/ifup.sh" "/sbin/ifup"
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -75,6 +75,7 @@ test_setup() {
inst "$basedir/modules.d/35network-legacy/ifup.sh" "/sbin/ifup"
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -53,6 +53,7 @@ test_setup() {
inst "$basedir/modules.d/35network-legacy/ifup.sh" "/sbin/ifup"
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -88,6 +88,7 @@ test_setup() {
inst "$basedir/modules.d/35network-legacy/ifup.sh" "/sbin/ifup"
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -48,6 +48,7 @@ test_setup() {
inst "$basedir/modules.d/35network-legacy/ifup.sh" "/sbin/ifup"
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -320,6 +320,7 @@ test_setup() {
done
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -162,6 +162,7 @@ test_setup() {
inst_simple /etc/os-release
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -174,6 +174,7 @@ test_setup() {
inst_simple /etc/os-release
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -219,6 +219,7 @@ make_encrypted_root() {
inst_multiple -o ${_terminfodir}/l/linux
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"
@@ -299,6 +300,7 @@ make_client_root() {
inst_multiple -o ${_terminfodir}/l/linux
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -270,6 +270,7 @@ test_setup() {
done
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

View File

@@ -15,6 +15,7 @@ test_setup() {
ln -sfnr "$basedir"/dracut-util "$TESTDIR"/dracut-getarg
ln -sfnr "$basedir"/dracut-util "$TESTDIR"/dracut-getargs
ln -sfnr "$basedir"/modules.d/99base/dracut-lib.sh "$TESTDIR"/dracut-lib.sh
ln -sfnr "$basedir"/modules.d/99base/dracut-dev-lib.sh "$TESTDIR"/dracut-dev-lib.sh
return 0
}
@@ -85,6 +86,7 @@ test_run() {
export PATH=".:$PATH"
. dracut-dev-lib.sh
. dracut-lib.sh
debug_off() {

View File

@@ -48,6 +48,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \
python3-imgcreate \
which \
ShellCheck \
shfmt \
&& dnf -y update && dnf clean all
# Set default command

View File

@@ -48,6 +48,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \
python3-imgcreate \
which \
ShellCheck \
shfmt \
&& dnf -y update && dnf clean all
# Set default command

View File

@@ -48,6 +48,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \
python3-imgcreate \
which \
ShellCheck \
shfmt \
&& dnf -y update && dnf clean all
# Set default command

View File

@@ -48,6 +48,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \
python3-imgcreate \
which \
ShellCheck \
shfmt \
&& dnf -y update && dnf clean all
# Set default command