Add storage detection logic to debian deploy
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16154 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -4,6 +4,39 @@ if [ ! -c /dev/vcs ]; then | ||||
|     mknod /dev/vcs c 7 0 | ||||
| fi | ||||
|  | ||||
| for disk in /dev/vd*[^0-9]; do | ||||
| 	if [ -z "$firstdirectdisk" ]; then firstdirectdisk=$disk; fi #remember first disk as a guess of medium resort | ||||
| 	#no edd_id in debian installer, no edd hints supported | ||||
| done | ||||
| if [ -z "$firstdirectdisk" ]; then | ||||
| 	for disk in /dev/sd*[^0-9]; do | ||||
| 		currdriver=`udevadm info --attribute-walk --name $disk |grep DRIVERS|grep -v '""'|grep -v '"sd"'|head -n 1|sed -e 's/[^"]*"//' -e 's/"//'` | ||||
| 		case "$currdriver" in | ||||
| 			"ata_piix4"|"PMC MaxRAID"|"ahci"|"megaraid_sas") #certainly direct | ||||
| 				if [ -z "$firstdirectdisk" ]; then firstdirectdisk=$disk; fi #remember first disk as a guess of medium resor | ||||
| 				;; | ||||
| 			 "mptsas"|"mpt2sas") #*PROBABLY* not SAN, but SAS SAN is possible | ||||
| 				if [ -z "$probablyfirstdirectdisk" ]; then probablyfirstdirectdisk=$disk; fi | ||||
| 				;; | ||||
| 			*) # could be san or who knows what, use it as a last resort | ||||
| 				if [ -z "$firstdisk" ]; then firstdisk=$disk; fi  | ||||
| 				;; | ||||
| 		esac | ||||
| 	done | ||||
| fi | ||||
| if [ -z "$instdisk" ]; then | ||||
|         if [ ! -z "$firstdirectdisk" ]; then | ||||
|                 instdisk=$firstdirectdisk | ||||
|         elif [ ! -z "$probablyfirstdirectdisk" ]; then | ||||
|                 instdisk=$probablyfirstdirectdisk | ||||
|         elif [ ! -z "$firstdisk" ]; then | ||||
|                 instdisk=$firstdisk | ||||
|         fi | ||||
| fi | ||||
| debconf-set partman-auto/disk "$instdisk" | ||||
|  | ||||
|  | ||||
|  | ||||
| cat >/tmp/foo.sh <<EOF | ||||
| #!/bin/sh | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user