functionality the module implements is being used on the host system.
For example, if this module handles installing support for LUKS
encrypted volumes, it should return 0 if all the tools to handle
- encrpted volumes are available and the host system has the root
+ encrypted volumes are available and the host system has the root
partition on an encrypted volume, 1 otherwise.
`depends()`:
$DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2> /dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq
}
-# Version comparision function. Assumes Linux style version scheme.
+# Version comparison function. Assumes Linux style version scheme.
# $1 = version a
-# $2 = comparision op (gt, ge, eq, le, lt, ne)
+# $2 = comparison op (gt, ge, eq, le, lt, ne)
# $3 = version b
vercmp() {
local _n1
<EFI> might be _/efi_, _/boot_ or _/boot/efi_ depending on where the ESP
partition is mounted. The <BUILD_ID> is taken from BUILD_ID in
_/usr/lib/os-release_ or if it exists _/etc/os-release_ and is left out,
- if BUILD_ID is non-existant or empty.
+ if BUILD_ID is non-existent or empty.
**--no-uefi**::
Disables UEFI mode.
NOTE: memstrack is a memory tracing tool that tracks the total memory
consumption, and peak memory consumption of each kernel modules
and userspace progress during the whole initramfs runtime, report
- is genereted and the end of initramsfs run.
+ is generated and the end of initramsfs run.
5 - /proc/meminfo + /proc/slabinfo + memstrack (with top memory stacktrace)
NOTE: memstrack (with top memory stacktrace) will print top memory
allocation stack traces during the whole initramfs runtime.
device this provides the following advantages:
- you can unlock your disk(s) using multiple passphrases
-- better security by not loosing the key stretching mechanism
+- better security by not losing the key stretching mechanism
To use an encrypted _keydev_ you *must* ensure that it becomes
available by using the keyword `keysource`, e.g.
<EFI> might be _/efi_, _/boot_ or _/boot/efi_ depending on where the ESP
partition is mounted. The <BUILD_ID> is taken from BUILD_ID in
_/usr/lib/os-release_ or if it exists _/etc/os-release_ and is left out,
- if BUILD_ID is non-existant or empty.
+ if BUILD_ID is non-existent or empty.
*machine_id=*"__{yes|no}__"::
Affects the default output filename of the UEFI executable, including the
==== inst_rules <udevrule> [ <udevrule> ...]
-installs one or more udev rules. Non-existant udev rules are reported, but do
+installs one or more udev rules. Non-existent udev rules are reported, but do
not let dracut fail.
==== instmods <kernelmodule> [ <kernelmodule> ... ]
elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
#if /boot is not a separate partition BOOT_IMAGE might start with /boot
BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"}
- #on some achitectures BOOT_IMAGE does not contain path to kernel
+ #on some architectures BOOT_IMAGE does not contain path to kernel
#so if we can't find anything, let's treat it in the same way as if it was empty
if ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
install() {
# Excluding "$tmpfilesdir/home.conf", sets up /home /srv
- # Excluding "$tmpfilesdir/journal-nocow.conf", requires spesific btrfs setup
- # Excluding "$tmpfilesdir/legacy.conf", belongs in seperated legacy module
- # Excluding "$tmpfilesdir/systemd-nologin.conf", belongs in seperated pam module
- # Excluding "$tmpfilesdir/systemd-nspawn.conf", belongs in seperated machined module
- # Excluding "$tmpfilesdir/x11.conf", belongs in seperated x11 module
+ # Excluding "$tmpfilesdir/journal-nocow.conf", requires specific btrfs setup
+ # Excluding "$tmpfilesdir/legacy.conf", belongs in separated legacy module
+ # Excluding "$tmpfilesdir/systemd-nologin.conf", belongs in separated pam module
+ # Excluding "$tmpfilesdir/systemd-nspawn.conf", belongs in separated machined module
+ # Excluding "$tmpfilesdir/x11.conf", belongs in separated x11 module
inst_multiple -o \
/usr/lib/group \
install() {
inst rngd
inst_simple "${moddir}/rngd.service" "${systemdsystemunitdir}/rngd.service"
- # make sure dependant libs are installed too
+ # make sure dependent libs are installed too
inst_libdir_file opensc-pkcs11.so
$SYSTEMCTL -q --root "$initdir" add-wants sysinit.target rngd.service
fi >> /tmp/net."$netif".resolv.conf
fi
# Note: hostname can be fqdn OR short hostname, so chop off any
- # trailing domain name and explicity add any domain if set.
+ # trailing domain name and explicitly add any domain if set.
[ -n "$hostname" ] && echo "echo ${hostname%."$domain"}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
}
fi
# Note: hostname can be fqdn OR short hostname, so chop off any
- # trailing domain name and explicity add any domain if set.
+ # trailing domain name and explicitly add any domain if set.
[ -n "$hostname" ] && echo "echo ${hostname%."$domain"}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
}
: > "/tmp/net.$(cat /sys/class/net/"${netif}"/address).up"
fi
- # Check if DHCP also suceeded on another interface before this one.
+ # Check if DHCP also succeeded on another interface before this one.
# We will always use the first one on which DHCP succeeded, by using
- # a commom file $IFNETFILE, to synchronize between threads.
+ # a common file $IFNETFILE, to synchronize between threads.
# Consider the race condition in which multiple threads
# corresponding to different interfaces may try to read $IFNETFILE
# and find it does not exist; they may all end up thinking they are the
fi
# disable manual ifup while netroot is set for simplifying our logic
-# in netroot case we prefer netroot to bringup $netif automaticlly
+# in netroot case we prefer netroot to bringup $netif automatically
[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2"
if [ -n "$manualup" ]; then
echo "ip=$dev:dhcp"
fi
elif [ -e "${iface}"/ip-addr ]; then
- # skip not assigned ip adresses
+ # skip not assigned ip addresses
[ "$ip" = "0.0.0.0" ] && continue
[ -e "${iface}"/gateway ] && read -r gw < "${iface}"/gateway
[ "$gw" = "0.0.0.0" ] && unset gw
return 1
fi
- # see, if we can bind it to some hw parms
+ # see, if we can bind it to some hw params
if hw_bind "$_netif" "$_macaddr"; then
# only print out DEVICE, if it's user assigned
is_kernel_ethernet_name "$_netif" && return 0
# 0: success
# 253: unknown error (file missing)
# 254: unhandled URL scheme / protocol
-# 255: bad arguments / unparseable URLs
+# 255: bad arguments / unparsable URLs
# other: fetch command failure (whatever curl/mount/etc return)
fetch_url() {
local url="$1" outloc="$2"
echo 0 "$sz" snapshot "$base" "$over" PO 8 | dmsetup create live-rw
fi
- # Create a device for the ro base of overlayed file systems.
+ # Create a device for the ro base of overlaid file systems.
if [ -z "$overlayfs" ]; then
echo 0 "$sz" linear "$BASE_LOOPDEV" 0 | dmsetup create --readonly live-base
fi
fi
# Note lldpad will stay running after switchroot, the system initscripts
-# are to kill it and start a new lldpad to take over. Data is transfered
+# are to kill it and start a new lldpad to take over. Data is transferred
# between the 2 using a shm segment
lldpad -d
# wait for lldpad to be ready
# Set fstype, might help somewhere
fstype=${nfs#/dev/}
-# Rewrite root so we don't have to parse this uglyness later on again
+# Rewrite root so we don't have to parse this ugliness later on again
netroot="$fstype:$server:$path:$options"
# If we don't have a server, we need dhcp
# shellcheck disable=SC2034
rootok=1
-# Shut up init error check or make sure that block parser wont get
+# Shut up init error check or make sure that block parser won't get
# confused by having /dev/nfs[4]
root="$fstype"
getarg 'rd.break=mount' -d 'rdbreak=mount' && emergency_shell -n mount "Break before mount"
# mount scripts actually try to mount the root filesystem, and may
-# be sourced any number of times. As soon as one suceeds, no more are sourced.
+# be sourced any number of times. As soon as one succeeds, no more are sourced.
i=0
while :; do
if ismounted "$NEWROOT"; then
}
# get a systemd-compatible unit name from a path
-# (mimicks unit_name_from_path_instance())
+# (mimics unit_name_from_path_instance())
dev_unit_name() {
local dev="$1"
# Splits given string 'str' with separator 'sep' into variables 'var1', 'var2',
# 'varN'. If number of fields is less than number of variables, remaining are
# not set. If number of fields is greater than number of variables, the last
-# variable takes remaining fields. In short - it acts similary to 'read'.
+# variable takes remaining fields. In short - it acts similarly to 'read'.
#
# splitsep sep str var1 var2 varN
#
getarg 'rd.break=mount' -d 'rdbreak=mount' && emergency_shell -n mount "Break before mount"
# mount scripts actually try to mount the root filesystem, and may
-# be sourced any number of times. As soon as one suceeds, no more are sourced.
+# be sourced any number of times. As soon as one succeeds, no more are sourced.
_i_mount=0
while :; do
if ismounted "$NEWROOT"; then
// offset from the start of this archive
off: u64,
// next mapped inode number, used instead of source file inode numbers to
- // ensure reproducability. XXX: should track inode per mapped dev?
+ // ensure reproducibility. XXX: should track inode per mapped dev?
ino: u32,
}
pub short: Option<char>,
/// The long name of this argument.
pub long: &'static str,
- /// Helpfuly usage information for this argument to display to the user.
+ /// Helpful usage information for this argument to display to the user.
pub help: &'static str,
}
} \
} while(false)
-/* Because statfs.t_type can be int on some architecures, we have to cast
+/* Because statfs.t_type can be int on some architectures, we have to cast
* the const magic to the type, otherwise the compiler warns about
* signed/unsigned comparison, because the magic can be 32 bit unsigned.
*/
udevadm settle
set -ex
mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/disk/by-id/ata-disk_raid[123]
-# wait for the array to finish initailizing, otherwise this sometimes fails
+# wait for the array to finish initializing, otherwise this sometimes fails
# randomly.
mdadm -W /dev/md0 || :
printf test > keyfile
udevadm settle
set -ex
mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/disk/by-id/ata-disk_raid[123]
-# wait for the array to finish initailizing, otherwise this sometimes fails
+# wait for the array to finish initializing, otherwise this sometimes fails
# randomly.
mdadm -W /dev/md0 || :
printf test > keyfile
cryptsetup luksOpen /dev/disk/by-id/ata-disk_disk2 dracut_disk2 < /keyfile
cryptsetup luksOpen /dev/disk/by-id/ata-disk_disk3 dracut_disk3 < /keyfile
mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/mapper/dracut_disk1 /dev/mapper/dracut_disk2 /dev/mapper/dracut_disk3
-# wait for the array to finish initailizing, otherwise this sometimes fails
+# wait for the array to finish initializing, otherwise this sometimes fails
# randomly.
mdadm -W /dev/md0
lvm pvcreate -ff -y /dev/md0
mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 \
/dev/mapper/isw*p*[234]
-# wait for the array to finish initailizing, otherwise this sometimes fails
+# wait for the array to finish initializing, otherwise this sometimes fails
# randomly.
mdadm -W /dev/md0
set -e
client_run rd.auto rd.md.imsm=0 || return 1
client_run rd.md.uuid="$MD_UUID" rd.dm=0 || return 1
# This test succeeds, because the mirror parts are found without
- # assembling the mirror itsself, which is what we want
+ # assembling the mirror itself, which is what we want
client_run rd.md.uuid="$MD_UUID" rd.md=0 rd.md.imsm failme && return 1
client_run rd.md.uuid="$MD_UUID" rd.md=0 failme && return 1
# the following test hangs on newer md
option domain-name "other.com";
# MAC numbering scheme:
-# NFSv3: last octect starts at 0x00 and works up
+# NFSv3: last octet starts at 0x00 and works up
group {
# NFSv3 root=dhcp or root={/dev/,}nfs, use server-id
}
# MAC numbering scheme:
- # NFSv4: last octect starts at 0x80 and works up
+ # NFSv4: last octet starts at 0x80 and works up
group {
# NFSv4 root={/dev/,}nfs4, use server-id
test_nfsv3() {
# MAC numbering scheme:
- # NFSv3: last octect starts at 0x00 and works up
- # NFSv4: last octect starts at 0x80 and works up
+ # NFSv3: last octet starts at 0x00 and works up
+ # NFSv4: last octet starts at 0x80 and works up
client_test "NFSv3 root=dhcp DHCP path only" 52:54:00:12:34:00 \
"root=dhcp" 192.168.50.1 -wsize=4096 || return 1
option domain-name "other.com";
# MAC numbering scheme:
- # NFSv3: last octect starts at 0x00 and works up
+ # NFSv3: last octet starts at 0x00 and works up
group {
option root-path "iscsi:192.168.50.1:::1:iqn.2009-06.dracut:target0";
option domain-name "other.com";
# MAC numbering scheme:
- # NFSv3: last octect starts at 0x00 and works up
+ # NFSv3: last octet starts at 0x00 and works up
group {
#option root-path "iscsi:192.168.51.1:::1:iqn.2009-06.dracut:target1";
option domain-name "other.com";
# MAC numbering scheme:
- # NFSv3: last octect starts at 0x00 and works up
+ # NFSv3: last octet starts at 0x00 and works up
group {
option root-path "iscsi:192.168.50.1:::1:iqn.2009-06.dracut:target0";
option domain-name "other.com";
# MAC numbering scheme:
- # NFSv3: last octect starts at 0x00 and works up
+ # NFSv3: last octet starts at 0x00 and works up
group {
#option root-path "iscsi:192.168.51.1:::1:iqn.2009-06.dracut:target1";
test_client() {
# Mac Numbering Scheme
- # ...:00-02 receive IP adresses all others don't
+ # ...:00-02 receive IP addresses all others don't
# ...:02 receives a dhcp root-path
# PXE Style BOOTIF=