File: zfs

package info (click to toggle)
zfs-linux 2.3.4~git20250812.3b64a96-1
  • links: PTS, VCS
  • area: contrib
  • in suites: experimental
  • size: 70,688 kB
  • sloc: ansic: 393,668; sh: 68,068; asm: 47,734; python: 8,160; makefile: 5,125; perl: 859; sed: 41
file content (53 lines) | stat: -rwxr-xr-x 985 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
# shellcheck disable=SC2154


if [ "$1" = "prereqs" ]; then
        echo mdadm mdrun multipath
        exit 0
fi


#
# Helper functions
#
message()
{
        if plymouth --ping 2>/dev/null; then
                plymouth message --text="$*"
        else
                echo "$*" >&2
        fi
        return 0
}

udev_settle()
{
        # Wait for udev to be ready, see https://launchpad.net/bugs/85640
        if [ -x /sbin/udevadm ]; then
                /sbin/udevadm settle --timeout=30
        elif [ -x /sbin/udevsettle ]; then
                /sbin/udevsettle --timeout=30
        fi
        return 0
}


activate_vg()
{
        # Sanity checks
        if [ ! -x /sbin/lvm ]; then
                [ "$quiet" != "y" ] && message "lvm is not available"
                return 1
        fi

        # Detect and auto-activate available volume groups
        /sbin/lvm vgscan
        /sbin/lvm vgchange -aay --sysinit
        return $?
}

udev_settle
activate_vg

exit 0