PHP 8.2.30
Preview: dracut-cmdline.sh Size: 2.59 KB
//proc/thread-self/root/proc/thread-self/root/proc/self/root/lib/dracut/modules.d/98dracut-systemd/dracut-cmdline.sh

#!/bin/sh

if [ -f /dracut-state.sh ]; then
    . /dracut-state.sh 2>/dev/null
fi
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

[ -f /usr/lib/initrd-release ] && . /usr/lib/initrd-release
[ -n "$VERSION" ] && info "dracut-$VERSION"

if ! getargbool 1 'rd.hostonly'; then
    [ -f /etc/cmdline.d/99-cmdline-ask.conf ] && mv /etc/cmdline.d/99-cmdline-ask.conf /tmp/99-cmdline-ask.conf
    remove_hostonly_files
    [ -f /tmp/99-cmdline-ask.conf ] && mv /tmp/99-cmdline-ask.conf /etc/cmdline.d/99-cmdline-ask.conf
fi

info "Using kernel command line parameters:" $(getcmdline)

getargbool 0 rd.udev.log-priority=info -d rd.udev.info -d -n -y rdudevinfo && echo 'udev_log="info"' >> /etc/udev/udev.conf
getargbool 0 rd.udev.log-priority=debug -d rd.udev.debug -d -n -y rdudevdebug && echo 'udev_log="debug"' >> /etc/udev/udev.conf

source_conf /etc/conf.d

# Get the "root=" parameter from the kernel command line, but differentiate
# between the case where it was set to the empty string and the case where it
# wasn't specified at all.
if ! root="$(getarg root=)"; then
    root_unset='UNSET'
fi

rflags="$(getarg rootflags=)"
getargbool 0 ro && rflags="${rflags},ro"
getargbool 0 rw && rflags="${rflags},rw"
rflags="${rflags#,}"

fstype="$(getarg rootfstype=)"
if [ -z "$fstype" ]; then
    fstype="auto"
fi

export root
export rflags
export fstype

make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab'
# run scriptlets to parse the command line
getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline"
source_hook cmdline

[ -f /lib/dracut/parse-resume.sh ] && . /lib/dracut/parse-resume.sh

case "${root}${root_unset}" 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/*)
        root="block:${root}"
        rootok=1 ;;
    UNSET|gpt-auto)
        # systemd's gpt-auto-generator handles this case.
        rootok=1 ;;
esac

[ -z "${root}${root_unset}" ] && die "Empty root= argument"
[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"

export root rflags fstype netroot NEWROOT

export -p > /dracut-state.sh

exit 0

Directory Contents

Dirs: 0 × Files: 40

Name Size Perms Modified Actions
847 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
418 B lrwxr-xr-x 2018-10-08 13:38:33
Edit Download
904 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
1.52 KB lrw-r--r-- 2018-10-09 08:48:58
Edit Download
442 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
2.59 KB lrwxr-xr-x 2025-12-17 18:54:46
Edit Download
681 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
1.35 KB lrwxr-xr-x 2018-10-08 13:38:33
Edit Download
821 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
1.51 KB lrw-r--r-- 2018-10-09 08:48:58
Edit Download
439 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
2.10 KB lrwxr-xr-x 2018-10-08 13:38:33
Edit Download
793 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
1.50 KB lrw-r--r-- 2018-10-09 08:48:58
Edit Download
416 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
1.03 KB lrwxr-xr-x 2018-10-08 13:38:33
Edit Download
822 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
1.51 KB lrw-r--r-- 2018-10-09 08:48:58
Edit Download
434 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
502 B lrwxr-xr-x 2025-12-17 18:54:46
Edit Download
1.10 KB lrw-r--r-- 2018-10-08 13:38:33
Edit Download
1.50 KB lrw-r--r-- 2018-10-09 08:48:58
Edit Download
429 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
895 B lrwxr-xr-x 2025-12-17 18:54:46
Edit Download
914 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
1.51 KB lrw-r--r-- 2018-10-09 08:48:58
Edit Download
440 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
467 B lrwxr-xr-x 2025-12-17 18:54:46
Edit Download
993 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
1.50 KB lrw-r--r-- 2018-10-09 08:48:58
Edit Download
424 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
1.38 KB lrwxr-xr-x 2018-10-08 13:38:33
Edit Download
309 B lrw-r--r-- 2025-12-17 18:54:47
Edit Download
440 B lrw-r--r-- 2025-12-17 18:54:47
Edit Download
3.72 KB lrw-r--r-- 2025-12-17 18:54:48
Edit Download
1.84 KB lrw-r--r-- 2025-12-17 18:54:47
Edit Download
135 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
692 B lrw-r--r-- 2018-10-08 13:38:33
Edit Download
2.02 KB lrwxr-xr-x 2025-12-17 18:54:46
Edit Download
4.05 KB lrwxr-xr-x 2025-12-17 18:54:46
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).