/usr/lib/dracut/modules.d/01systemd-initrd/module-setup.sh is in dracut-core 047-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | #!/bin/bash
# called by dracut
check() {
[[ $mount_needs ]] && return 1
if ! dracut_module_included "systemd"; then
derror "systemd-initrd needs systemd in the initramfs"
return 1
fi
return 0
}
# called by dracut
depends() {
echo "systemd"
}
installkernel() {
return 0
}
# called by dracut
install() {
local _mods
inst_multiple -o \
$systemdsystemunitdir/initrd.target \
$systemdsystemunitdir/initrd-fs.target \
$systemdsystemunitdir/initrd-root-device.target \
$systemdsystemunitdir/initrd-root-fs.target \
$systemdsystemunitdir/initrd-switch-root.target \
$systemdsystemunitdir/initrd-switch-root.service \
$systemdsystemunitdir/initrd-cleanup.service \
$systemdsystemunitdir/initrd-udevadm-cleanup-db.service \
$systemdsystemunitdir/initrd-parse-etc.service
ln_r "${systemdsystemunitdir}/initrd.target" "${systemdsystemunitdir}/default.target"
if [ -e /etc/os-release ]; then
. /etc/os-release
VERSION+=" "
PRETTY_NAME+=" "
else
VERSION=""
PRETTY_NAME=""
fi
NAME=dracut
ID=dracut
VERSION+="dracut-$DRACUT_VERSION"
PRETTY_NAME+="dracut-$DRACUT_VERSION (Initramfs)"
VERSION_ID=$DRACUT_VERSION
ANSI_COLOR="0;34"
{
echo NAME=\"$NAME\"
echo VERSION=\"$VERSION\"
echo ID=$ID
echo VERSION_ID=$VERSION_ID
echo PRETTY_NAME=\"$PRETTY_NAME\"
echo ANSI_COLOR=\"$ANSI_COLOR\"
} > $initdir/usr/lib/initrd-release
echo dracut-$DRACUT_VERSION > $initdir/lib/dracut/dracut-$DRACUT_VERSION
ln -sf ../usr/lib/initrd-release $initdir/etc/initrd-release
ln -sf initrd-release $initdir/usr/lib/os-release
ln -sf initrd-release $initdir/etc/os-release
}
|