403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/dracut/modules.d/98dracut-systemd/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

export DRACUT_SYSTEMD=1
if [ -f /dracut-state.sh ]; then
    . /dracut-state.sh 2> /dev/null
fi
command -v getarg > /dev/null || . /lib/dracut-lib.sh

source_conf /etc/conf.d

make_trace_mem "hook initqueue" '1:shortmem' '2+:mem' '3+:slab'
getargs 'rd.break=initqueue' && emergency_shell -n initqueue "Break before initqueue"

RDRETRY=$(getarg rd.retry)
RDRETRY=${RDRETRY:-180}
RDRETRY=$((RDRETRY * 2))
export RDRETRY

main_loop=0
export main_loop

while :; do

    check_finished && break

    udevadm settle --exit-if-exists="$hookdir"/initqueue/work

    check_finished && break

    if [ -f "$hookdir"/initqueue/work ]; then
        rm -f -- "$hookdir/initqueue/work"
    fi

    for job in "$hookdir"/initqueue/*.sh; do
        [ -e "$job" ] || break
        # shellcheck disable=SC2097 disable=SC1090 disable=SC2098
        job=$job . "$job"
        check_finished && break 2
    done

    udevadm settle --timeout=0 > /dev/null 2>&1 || continue

    for job in "$hookdir"/initqueue/settled/*.sh; do
        [ -e "$job" ] || break
        # shellcheck disable=SC2097 disable=SC1090 disable=SC2098
        job=$job . "$job"
        check_finished && break 2
    done

    udevadm settle --timeout=0 > /dev/null 2>&1 || continue

    # no more udev jobs and queues empty.
    sleep 0.5

    for i in /run/systemd/ask-password/ask.*; do
        [ -e "$i" ] && continue 2
    done

    if [ $main_loop -gt $((2 * RDRETRY / 3)) ]; then
        warn "dracut-initqueue: timeout, still waiting for following initqueue hooks:"
        for _f in "$hookdir"/initqueue/finished/*.sh; do
            warn "$_f: \"$(cat "$_f")\""
        done
        if [ "$(ls -A "$hookdir"/initqueue/finished)" ]; then
            warn "dracut-initqueue: starting timeout scripts"
            for job in "$hookdir"/initqueue/timeout/*.sh; do
                [ -e "$job" ] || break
                # shellcheck disable=SC2097 disable=SC1090 disable=SC2098
                job=$job . "$job"
                udevadm settle --timeout=0 > /dev/null 2>&1 || main_loop=0
                [ -f "$hookdir"/initqueue/work ] && main_loop=0
                [ $main_loop -eq 0 ] && break
            done
        fi
    fi

    main_loop=$((main_loop + 1))
    if [ $main_loop -gt $RDRETRY ]; then
        if ! [ -f /sysroot/etc/fstab ] || ! [ -e /sysroot/sbin/init ]; then
            emergency_shell "Could not boot."
        fi
        warn "Not all disks have been found."
        warn "You might want to regenerate your initramfs."
        break
    fi
done

unset job
unset queuetriggered
unset main_loop
unset RDRETRY

export -p > /dracut-state.sh

exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit