GRAYBYTE WORDPRESS FILE MANAGER2792

Server IP : 198.54.121.189 / Your IP : 216.73.216.224
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /lib/dracut/modules.d/98dracut-systemd/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /lib/dracut/modules.d/98dracut-systemd//rootfs-generator.sh
#!/bin/sh

type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

generator_wait_for_dev()
{
    local _name
    local _timeout

    _name="$(str_replace "$1" '/' '\x2f')"
    _timeout=$(getarg rd.timeout)
    _timeout=${_timeout:-0}

    if ! [ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ]; then

        # If a LUKS device needs unlocking via systemd in the initrd, assume
        # it's for the root device. In that case, don't block on it if it's
        # after remote-fs-pre.target since the initqueue is ordered before it so
        # it will never actually show up (think Tang-pinned rootfs).
        cat > "$hookdir/initqueue/finished/devexists-${_name}.sh" << EOF
if ! grep -q After=remote-fs-pre.target /run/systemd/generator/systemd-cryptsetup@*.service 2>/dev/null; then
    [ -e "$1" ]
fi
EOF
        {
            printf '[ -e "%s" ] || ' $1
            printf 'warn "\"%s\" does not exist"\n' $1
        } >> "$hookdir/emergency/80-${_name}.sh"
    fi

    _name=$(dev_unit_name "$1")
    if ! [ -L "$GENERATOR_DIR"/initrd.target.wants/${_name}.device ]; then
        [ -d "$GENERATOR_DIR"/initrd.target.wants ] || mkdir -p "$GENERATOR_DIR"/initrd.target.wants
        ln -s ../${_name}.device "$GENERATOR_DIR"/initrd.target.wants/${_name}.device
    fi

    if ! [ -f "$GENERATOR_DIR"/${_name}.device.d/timeout.conf ]; then
        mkdir -p "$GENERATOR_DIR"/${_name}.device.d
        {
            echo "[Unit]"
            echo "JobTimeoutSec=$_timeout"
            echo "JobRunningTimeoutSec=$_timeout"
        } > "$GENERATOR_DIR"/${_name}.device.d/timeout.conf
    fi
}

generator_mount_rootfs()
{
    local _type=$2
    local _flags=$3
    local _name

    [ -z "$1" ] && return 0

    _name=$(dev_unit_name "$1")
    [ -d "$GENERATOR_DIR" ] || mkdir -p "$GENERATOR_DIR"
    if ! [ -f "$GENERATOR_DIR"/sysroot.mount ]; then
        {
            echo "[Unit]"
            echo "Before=initrd-root-fs.target"
            echo "Requires=systemd-fsck@${_name}.service"
            echo "After=systemd-fsck@${_name}.service"
            echo "[Mount]"
            echo "Where=/sysroot"
            echo "What=$1"
            echo "Options=${_flags}"
            echo "Type=${_type}"
        } > "$GENERATOR_DIR"/sysroot.mount
    fi
    if ! [ -L "$GENERATOR_DIR"/initrd-root-fs.target.requires/sysroot.mount ]; then
        [ -d "$GENERATOR_DIR"/initrd-root-fs.target.requires ] || mkdir -p "$GENERATOR_DIR"/initrd-root-fs.target.requires
        ln -s ../sysroot.mount "$GENERATOR_DIR"/initrd-root-fs.target.requires/sysroot.mount
    fi
}

generator_fsck_after_pre_mount()
{
    local _name

    [ -z "$1" ] && return 0

    _name=$(dev_unit_name "$1")
    [ -d /run/systemd/generator/systemd-fsck@${_name}.service.d ] || mkdir -p /run/systemd/generator/systemd-fsck@${_name}.service.d
    if ! [ -f /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf ]; then
        {
            echo "[Unit]"
            echo "After=dracut-pre-mount.service"
        } > /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf
    fi

}

root=$(getarg root=)
case "$root" in
    block:LABEL=*|LABEL=*)
        root="${root#block:}"
        root="$(echo $root | sed 's,/,\\x2f,g')"
        root="block:/dev/disk/by-label/${root#LABEL=}"
        rootok=1 ;;
    block:UUID=*|UUID=*)
        root="${root#block:}"
        root="block:/dev/disk/by-uuid/${root#UUID=}"
        rootok=1 ;;
    block:PARTUUID=*|PARTUUID=*)
        root="${root#block:}"
        root="block:/dev/disk/by-partuuid/${root#PARTUUID=}"
        rootok=1 ;;
    block:PARTLABEL=*|PARTLABEL=*)
        root="${root#block:}"
        root="block:/dev/disk/by-partlabel/${root#PARTLABEL=}"
        rootok=1 ;;
    /dev/nfs) # ignore legacy /dev/nfs
        ;;
    /dev/*)
        root="block:${root}"
        rootok=1 ;;
esac

GENERATOR_DIR="$1"

if [ "$rootok" = "1"  ]; then
   generator_wait_for_dev "${root#block:}" "$RDRETRY"
   generator_fsck_after_pre_mount "${root#block:}"
   strstr "$(cat /proc/cmdline)" 'root=' || generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)"
fi

exit 0

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
April 06 2024 13:22:13
root / root
0755
dracut-cmdline-ask.service
0.827 KB
October 08 2018 13:38:33
root / root
0644
dracut-cmdline-ask.sh
0.408 KB
October 08 2018 13:38:33
root / root
0755
dracut-cmdline.service
0.883 KB
October 08 2018 13:38:33
root / root
0644
dracut-cmdline.service.8
1.519 KB
October 09 2018 08:48:58
root / root
0644
dracut-cmdline.service.8.asc
0.432 KB
October 08 2018 13:38:33
root / root
0644
dracut-cmdline.sh
2.589 KB
April 06 2024 13:22:06
root / root
0755
dracut-emergency.service
0.665 KB
October 08 2018 13:38:33
root / root
0644
dracut-emergency.sh
1.35 KB
October 08 2018 13:38:33
root / root
0755
dracut-initqueue.service
0.802 KB
October 08 2018 13:38:33
root / root
0644
dracut-initqueue.service.8
1.514 KB
October 09 2018 08:48:58
root / root
0644
dracut-initqueue.service.8.asc
0.429 KB
October 08 2018 13:38:33
root / root
0644
dracut-initqueue.sh
2.097 KB
October 08 2018 13:38:33
root / root
0755
dracut-mount.service
0.774 KB
October 08 2018 13:38:33
root / root
0644
dracut-mount.service.8
1.495 KB
October 09 2018 08:48:58
root / root
0644
dracut-mount.service.8.asc
0.406 KB
October 08 2018 13:38:33
root / root
0644
dracut-mount.sh
1.027 KB
October 08 2018 13:38:33
root / root
0755
dracut-pre-mount.service
0.803 KB
October 08 2018 13:38:33
root / root
0644
dracut-pre-mount.service.8
1.51 KB
October 09 2018 08:48:58
root / root
0644
dracut-pre-mount.service.8.asc
0.424 KB
October 08 2018 13:38:33
root / root
0644
dracut-pre-mount.sh
0.49 KB
April 06 2024 13:22:06
root / root
0755
dracut-pre-pivot.service
1.099 KB
October 08 2018 13:38:33
root / root
0644
dracut-pre-pivot.service.8
1.505 KB
October 09 2018 08:48:58
root / root
0644
dracut-pre-pivot.service.8.asc
0.419 KB
October 08 2018 13:38:33
root / root
0644
dracut-pre-pivot.sh
0.874 KB
April 06 2024 13:22:06
root / root
0755
dracut-pre-trigger.service
0.893 KB
October 08 2018 13:38:33
root / root
0644
dracut-pre-trigger.service.8
1.514 KB
October 09 2018 08:48:58
root / root
0644
dracut-pre-trigger.service.8.asc
0.43 KB
October 08 2018 13:38:33
root / root
0644
dracut-pre-trigger.sh
0.456 KB
April 06 2024 13:22:06
root / root
0755
dracut-pre-udev.service
0.97 KB
October 08 2018 13:38:33
root / root
0644
dracut-pre-udev.service.8
1.501 KB
October 09 2018 08:48:58
root / root
0644
dracut-pre-udev.service.8.asc
0.414 KB
October 08 2018 13:38:33
root / root
0644
dracut-pre-udev.sh
1.38 KB
October 08 2018 13:38:33
root / root
0755
dracut-shutdown-onfailure.service
0.302 KB
April 06 2024 13:22:07
root / root
0644
dracut-shutdown.service
0.43 KB
April 06 2024 13:22:07
root / root
0644
dracut-shutdown.service.8
3.724 KB
April 06 2024 13:22:08
root / root
0644
dracut-shutdown.service.8.asc
1.836 KB
April 06 2024 13:22:07
root / root
0644
dracut-tmpfiles.conf
0.132 KB
October 08 2018 13:38:33
root / root
0644
emergency.service
0.676 KB
October 08 2018 13:38:33
root / root
0644
module-setup.sh
2.023 KB
April 06 2024 13:22:06
root / root
0755
rootfs-generator.sh
4.055 KB
April 06 2024 13:22:06
root / root
0755

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF