--xz --zstd --no-compress --gzip --list-modules --show-modules --keep
--printsize --regenerate-all --noimageifnotneeded --early-microcode
--no-early-microcode --print-cmdline --reproducible --uefi'
-
- [ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers
+ [ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers
--omit-drivers --modules --omit --drivers --filesystems --install
--fwdir --libdirs --fscks --add-fstab --mount --device --nofscks
--kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix
}
usage() {
-# 80x25 linebreak here ^
+ # 80x25 linebreak here ^
cat << EOF
Usage: $0 [OPTION]... <initramfs> <base image> [<image>...]
Creates initial ramdisk image by concatenating several images from the command
. "$dracutbasedir"/dracut-version.sh
fi
-# 80x25 linebreak here ^
+ # 80x25 linebreak here ^
cat << EOF
Usage: $dracut_cmd [OPTION]... [<initramfs> [<kernel-version>]]
. "$dracutbasedir"/dracut-version.sh
fi
-# 80x25 linebreak here ^
+ # 80x25 linebreak here ^
cat << EOF
Usage: $dracut_cmd [OPTION]... [<initramfs> [<kernel-version>]]
_lsinitrd() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local -A OPTS=(
- [STANDALONE]='-s --size -h --help'
-
- [ARG]='-f --file -k --kver'
+ [STANDALONE]='-s --size -h --help'
+ [ARG]='-f --file -k --kver'
)
# shellcheck disable=SC2086
rescue.target \
systemd-ask-password-console.service \
systemd-ask-password-plymouth.service \
- ; do
+ ${NULL}; do
[[ -f "$systemdsystemunitdir"/$i ]] || continue
$SYSTEMCTL -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service
done
# grep '^systemd-timesync:' "$dracutsysrootdir"/etc/group >> "$initdir/etc/group"
_arch=${DRACUT_ARCH:-$(uname -m)}
- inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
+ inst_libdir_file \
+ {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
{"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*" \
{"tls/$_arch/",tls/,"$_arch/",}"libnss_myhostname.so.*" \
{"tls/$_arch/",tls/,"$_arch/",}"libnss_resolve.so.*"
+ # systemd-timesyncd.service
for i in \
systemd-networkd-wait-online.service \
systemd-networkd.service \
- systemd-networkd.socket
-# systemd-timesyncd.service
- do
+ systemd-networkd.socket \
+ ${NULL}; do
$SYSTEMCTL -q --root "$initdir" enable "$i"
done
}
modprobe squashfs
CMDLINE=$(getcmdline)
-for arg in $CMDLINE; do case $arg in ro|rw) liverw=$arg ;; esac; done
+for arg in $CMDLINE; do
+ case $arg in
+ ro | rw) liverw=$arg ;;
+ esac
+done
+
# mount the backing of the live image first
mkdir -m 0755 -p /run/initramfs/live
if [ -f $livedev ]; then
iscsiadm iscsid
for i in \
- iscsid.socket \
- iscsiuio.socket \
- ; do
+ iscsid.socket \
+ iscsiuio.socket \
+ ${NULL}; do
$SYSTEMCTL -q --root "$initdir" enable "$i"
done
-
+
for i in \
- iscsid.service \
- iscsiuio.service \
- ; do
+ iscsid.service \
+ iscsiuio.service \
+ ${NULL}; do
$SYSTEMCTL -q --root "$initdir" add-wants basic.target "$i"
done
dracut-pre-pivot.service \
dracut-pre-trigger.service \
dracut-pre-udev.service \
- ; do
+ ${NULL}; do
inst_simple "$moddir/${i}" "$systemdsystemunitdir/${i}"
$SYSTEMCTL -q --root "$initdir" add-wants initrd.target "$i"
done
for i in \
sysinit.target \
- basic.target \
- initrd-fs.target \
- initrd.target \
- initrd-switch-root.target \
- emergency.target \
- shutdown.target; do
+ basic.target \
+ initrd-fs.target \
+ initrd.target \
+ initrd-switch-root.target \
+ emergency.target \
+ shutdown.target \
+ ${NULL}; do
if ! systemd-analyze verify $i; then
warn "systemd-analyze verify $i failed"
poweroff
# install basic keyboard maps and fonts
for i in \
/usr/lib/kbd/consolefonts/eurlatgr* \
- /usr/lib/kbd/keymaps/{legacy/,/}include/* \
- /usr/lib/kbd/keymaps/{legacy/,/}i386/include/* \
- /usr/lib/kbd/keymaps/{legacy/,/}i386/qwerty/us.*; do
+ /usr/lib/kbd/keymaps/{legacy/,/}include/* \
+ /usr/lib/kbd/keymaps/{legacy/,/}i386/include/* \
+ /usr/lib/kbd/keymaps/{legacy/,/}i386/qwerty/us.* \
+ ${NULL}; do
[[ -f $i ]] || continue
inst $i
done
#!/bin/bash
set -x
export LC_MESSAGES=C
-rpm -Va |& \
- grep -F \
- '85-display-manager.preset| /run| /var| /usr/lib/variant| /etc/machine-id| /etc/systemd/system/dbus-org.freedesktop.network1.service| /etc/systemd/system/dbus-org.freedesktop.resolve1.service| /etc/udev/hwdb.bin| /usr/share/info/dir.old' \
- &> /test.output
-
-find / -xdev -type f -not -path '/var/*' \
- -not -path '/usr/lib/modules/*/modules.*' \
- -not -path '/etc/*-' \
- -not -path '/etc/.pwd.lock' \
- -not -path '/run/mount/utab' \
- -not -path '/test.sh' \
- -not -path '/test.output' \
- -not -path '/etc/nsswitch.conf.bak' \
- -not -path '/etc/iscsi/initiatorname.iscsi' \
- -not -path '/boot/*0-rescue*' \
- -not -path '/usr/share/mime/*' \
- -not -path '/etc/crypto-policies/*' \
- -not -path '/dev/null' \
- -not -path "/boot/loader/entries/\$(cat /etc/machine-id)-*" \
- -not -path "/boot/\$(cat /etc/machine-id)/*" \
- -not -path '/etc/openldap/certs/*' \
- -not -path '/etc/dnf/*' \
- -print0 | xargs -0 rpm -qf | \
- grep -F 'not owned' &>> /test.output || :
+rpm -Va 2>&1 | \\
+ grep -F \\
+ '85-display-manager.preset| /run| /var| /usr/lib/variant| /etc/machine-id| /etc/systemd/system/dbus-org.freedesktop.network1.service| /etc/systemd/system/dbus-org.freedesktop.resolve1.service| /etc/udev/hwdb.bin| /usr/share/info/dir.old' \\
+ &> /test.output
+
+find / -xdev -type f -not -path '/var/*' \\
+ -not -path '/usr/lib/modules/*/modules.*' \\
+ -not -path '/etc/*-' \\
+ -not -path '/etc/.pwd.lock' \\
+ -not -path '/run/mount/utab' \\
+ -not -path '/test.sh' \\
+ -not -path '/test.output' \\
+ -not -path '/etc/nsswitch.conf.bak' \\
+ -not -path '/etc/iscsi/initiatorname.iscsi' \\
+ -not -path '/boot/*0-rescue*' \\
+ -not -path '/usr/share/mime/*' \\
+ -not -path '/etc/crypto-policies/*' \\
+ -not -path '/dev/null' \\
+ -not -path "/boot/loader/entries/\$(cat /etc/machine-id)-*" \\
+ -not -path "/boot/\$(cat /etc/machine-id)/*" \\
+ -not -path '/etc/openldap/certs/*' \\
+ -not -path '/etc/dnf/*' \\
+ -print0 | xargs -0 rpm -qf | \\
+ grep -F 'not owned' &>> /test.output || :
exit 0
EOF