Server IP : 192.168.23.10  /  Your IP : 13.59.183.77
Web Server : Apache
System : Linux echo.premieradvertising.com 5.14.0-362.8.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 7 14:54:22 EST 2023 x86_64
User : rrrallyteam ( 1049)
PHP Version : 8.1.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF
Directory (0755) :  /home/../lib/dracut/modules.d/90crypt/../90dm/../../modules.d/04watchdog/../90dmraid/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/../lib/dracut/modules.d/90crypt/../90dm/../../modules.d/04watchdog/../90dmraid/dmraid.sh
#!/usr/bin/sh

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

devenc=$(str_replace "$1" '/' '\2f')

[ -e /tmp/dmraid."$devenc" ] && exit 0

: > /tmp/dmraid."$devenc"

DM_RAIDS=$(getargs rd.dm.uuid -d rd_DM_UUID=)

if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then
    # run dmraid if udev has settled
    info "Scanning for dmraid devices $DM_RAIDS"
    SETS=$(dmraid -c -s)

    if [ "$SETS" = "no raid disks" -o "$SETS" = "no raid sets" ]; then
        return
    fi

    info "Found dmraid sets:"
    echo "$SETS" | vinfo

    if [ -n "$DM_RAIDS" ]; then
        # only activate specified DM RAIDS
        for r in $DM_RAIDS; do
            for s in $SETS; do
                if [ "${s##$r}" != "$s" ]; then
                    info "Activating $s"
                    dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
                fi
            done
        done
    else
        # scan and activate all DM RAIDS
        for s in $SETS; do
            info "Activating $s"
            dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
            [ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo
            udevsettle
        done
    fi

    need_shutdown
fi