/usr/share/initramfs-tools/scripts/local-top/multipath is in multipath-tools-boot 0.4.9-3ubuntu7.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 54 55 56 57 58 59 60 61 62 63 64 | #!/bin/sh
#
# multipath discovery
PREREQ="udev iscsi"
prereqs() { echo "$PREREQ"; }
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /scripts/functions
verbose()
{
case "$quiet" in y*|Y*|1|t*|T*)
return 1;;
*)
return 0;;
esac
}
maybe_break pre-multipath
VERBOSITY=0
MP_MODULES="dm-multipath dm-emc"
if [ ! -e /sbin/multipath ]; then
exit 0
fi
verbose && log_begin_msg "Loading multipath modules"
for module in ${MP_MODULES}; do
if modprobe --syslog "$module"; then
verbose && log_success_msg "loaded module ${module}."
else
log_failure_msg "failed to load module ${module}."
fi
done
verbose && log_end_msg
# Sync waiting for storage.
verbose && log_begin_msg "Waiting for scsi storage"
{ rmmod scsi_wait_scan ; modprobe scsi_wait_scan ; rmmod scsi_wait_scan ; } >/dev/null 2>&1
verbose && log_end_msg
verbose && log_begin_msg "Discovering multipaths"
/sbin/multipath -v $VERBOSITY
verbose && log_end_msg
if [ -x /sbin/kpartx -a -x /sbin/dmsetup ]; then
/sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p -part" >/dev/null
fi
if [ -x /sbin/udevadm ]; then
/sbin/udevadm settle
fi
maybe_break post-multipath
exit 0
|