• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3# ex: ts=8 sw=4 sts=4 et filetype=sh
4
5MODPARM=/sys/module/scsi_mod/parameters
6if [ -w "$MODPARM/scan" ] ; then
7    scan_type=$(cat $MODPARM/scan)
8    if [ "$scan_type" = "manual" ] ; then
9	echo sync > $MODPARM/scan
10
11	for shost in /sys/class/scsi_host/host* ; do
12	    echo '- - -' > ${shost}/scan
13	done
14    fi
15fi
16