diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-05-30 15:36:45 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-06-12 13:03:55 +1000 |
commit | e54e26065cea435fed19b8b2687c87927f1b63f1 (patch) | |
tree | 9e3fb8f89aeac264cdab38910ce3c963a03401c1 /utils | |
parent | 917f7aa880a7c6ab08991ae0c969d0489ba48845 (diff) | |
download | talos-petitboot-e54e26065cea435fed19b8b2687c87927f1b63f1.tar.gz talos-petitboot-e54e26065cea435fed19b8b2687c87927f1b63f1.zip |
discover: Rescan SCSI devices on reinit
Explicitly rescan SCSI devices on reinit rather than just remounting
them in case a device did not init properly on boot.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Makefile.am | 3 | ||||
-rwxr-xr-x | utils/scsi-rescan | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/utils/Makefile.am b/utils/Makefile.am index c9015a0..a523430 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -12,7 +12,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -dist_sbin_SCRIPTS += utils/pb-udhcpc utils/pb-plugin utils/pb-sos utils/pb-exec +dist_sbin_SCRIPTS += utils/pb-udhcpc utils/pb-plugin utils/pb-sos \ + utils/pb-exec utils/scsi-rescan dist_pkglibexec_SCRIPTS = utils/pb-console sbin_PROGRAMS += utils/pb-event utils/pb-config diff --git a/utils/scsi-rescan b/utils/scsi-rescan new file mode 100755 index 0000000..1d1cb1b --- /dev/null +++ b/utils/scsi-rescan @@ -0,0 +1,5 @@ +#/bin/sh + +for host in /sys/class/scsi_host/host*; do + echo "- - -" > ${host}/scan +done |