PHP 7.4.33
Preview: fcoe-genrules.sh Size: 1.18 KB
//lib/dracut/modules.d/95fcoe/fcoe-genrules.sh

#!/bin/sh

# We use (fcoe_interface or fcoe_mac) and fcoe_dcb as set by parse-fcoe.sh
# If neither mac nor interface are set we don't continue
[ -z "$fcoe_interface" -a -z "$fcoe_mac" ] && return

# Write udev rules
{
    if [ -n "$fcoe_mac" ] ; then
        printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_mac" "$fcoe_dcb" "$fcoe_mode"
        printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="/sbin/initqueue --onetime --timeout --unique --name fcoe-timeout-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_mac" "$fcoe_dcb" "$fcoe_mode"
    else
        printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_interface" "$fcoe_dcb" "$fcoe_mode"
        printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --timeout --unique --name fcoe-timeout-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_interface" "$fcoe_dcb" "$fcoe_mode"
    fi
} >> /etc/udev/rules.d/92-fcoe.rules

Directory Contents

Dirs: 0 × Files: 8

Name Size Perms Modified Actions
544 B lrwxr-xr-x 2018-10-08 13:38:33
Edit Download
1.13 KB lrwxr-xr-x 2018-10-08 13:38:33
Edit Download
1.18 KB lrwxr-xr-x 2018-10-08 13:38:33
Edit Download
2.47 KB lrwxr-xr-x 2018-10-08 13:38:33
Edit Download
472 B lrwxr-xr-x 2024-04-06 13:22:07
Edit Download
3.34 KB lrwxr-xr-x 2024-04-06 13:22:07
Edit Download
1.99 KB lrwxr-xr-x 2024-04-06 13:22:07
Edit Download
111 B lrwxr-xr-x 2018-10-08 13:38:33
Edit Download

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