mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-24 16:05:41 +00:00 
			
		
		
		
	RH7/Centos7 and recent versions of fedora relocate `/*bin/*` into `/usr/*bin/`. This causes conflicts for upgrades against xCAT-genesis-scripts-* packages which expect the `/bin` a to be a directory while `xCAT-genesis-base-*` packages provide a link. Relocating all files into `/usr` fixes that conflict and allows a clean upgrade from all old versions.
		
			
				
	
	
		
			30 lines
		
	
	
		
			766 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			766 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| SOURCE_FILE="pseries_platform"
 | |
| PLATFORM_FILE=/proc/cpuinfo
 | |
| export PLATFORM_UNKNOWN=0
 | |
| export PLATFORM_POWERKVM_HOST=1
 | |
| export PLATFORM_POWERKVM_GUEST=2
 | |
| export PLATFORM_PSERIES_LPAR=3
 | |
| 
 | |
| export platform_name="Unknown"
 | |
| export platform=$PLATFORM_UNKNOWN
 | |
| 
 | |
| if grep -q "PowerNV" $PLATFORM_FILE; then
 | |
| 	platform_name="PowerKVM Host"
 | |
| 	platform=$PLATFORM_POWERKVM_HOST
 | |
| elif grep -q "IBM pSeries (emulated by qemu)" $PLATFORM_FILE; then
 | |
| 	platform_name="PowerKVM pSeries Guest"
 | |
| 	platform=$PLATFORM_POWERKVM_GUEST
 | |
| elif  grep -q "pSeries" $PLATFORM_FILE; then
 | |
| 	platform_name="PowerVM pSeries LPAR"
 | |
| 	platform=$PLATFORM_PSERIES_LPAR
 | |
| fi
 | |
| PARAM=$0
 | |
| BASENAME=`basename $0`
 | |
| echo "basename:$BASENAME, param:$PARAM"
 | |
| 
 | |
| if [ $SOURCE_FILE = `basename $0` ]; then
 | |
| 	echo $platform_name
 | |
| fi
 |