File: initramfs

package info (click to toggle)
multipath-tools 0.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,992 kB
  • sloc: ansic: 63,788; perl: 1,622; makefile: 729; sh: 647; pascal: 150
file content (36 lines) | stat: -rwxr-xr-x 813 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

set -ex -o pipefail

find_file() {
    echo "checking for file $1 in initramfs"
    FILES=$(find initramfs -name "$1")
    if [ -z "$FILES" ]; then
        echo "not found"
        exit 1
    fi
}

update-initramfs -kall -u
INITRDS=(/boot/initrd.img-*)

unmkinitramfs "${INITRDS[0]}" initramfs/
find initramfs/

echo "check our modules are installed in initramfs"
find_file 'dm-multipath.ko*'
find_file 'scsi_dh_alua.ko*'

echo "check our rules are installed in initramfs"
find_file '*-dm-mpath.rules'
find_file '*-multipath.rules'
find_file '*-dm-parts.rules'
find_file '*-del-part-nodes.rules'
find_file '*-kpartx.rules'

echo "check multipath binary is executable"
chroot initramfs /usr/sbin/multipath -h

echo "check helper programs are installed in initramfs"
find_file 'grep'
find_file 'pidof'