#!/bin/sh #---------------------------------------------------------------------------- # /etc/boot.d/rc040.partitions # # Last Update: $Id: rc020.hd-generic 24532 2012-12-15 16:24:25Z rresch $ #---------------------------------------------------------------------------- begin_script BOOT "scanning for partition tables on storage ..." # Interate through all scsi/usb block-devices in /proc/partitions and check, # whether its partition table was already scanned, wait up to 5 seconds for device in `sed -n 's/.*\(sd[a-z]$\)/\1/p' /proc/partitions` do for i in `seq 1 5` do dmesg | grep "^ $device:" && break sleep 1 done done end_script