mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-03 21:02:34 +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.
		
			
				
	
	
		
			25 lines
		
	
	
		
			919 B
		
	
	
	
		
			Awk
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			919 B
		
	
	
	
		
			Awk
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/awk -f
 | 
						|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
 | 
						|
BEGIN {
 | 
						|
        port = 3001
 | 
						|
        listener = "/inet/tcp/" port "/0/0"
 | 
						|
        quit = "no"
 | 
						|
        while (match(quit,"no")) {
 | 
						|
            while (match(quit,"no") && (listener |& getline) > 0) {
 | 
						|
                if (match($0,"restart")) {
 | 
						|
                    print "restarting bootstrap process" |& listener
 | 
						|
                    quit="yes"
 | 
						|
                    system("echo \"" $0 "\" > /restart")
 | 
						|
                    close(listener)
 | 
						|
                }else if(match($0,"processing")){
 | 
						|
                    print "processing request" |& listener
 | 
						|
                    system("echo \"" $0 "\" > /processing")
 | 
						|
                }else if(match($0,"processed")){
 | 
						|
                    print "finished request process" |& listener
 | 
						|
                    system("rm -rf /processing")
 | 
						|
                }
 | 
						|
           }
 | 
						|
           close(listener)
 | 
						|
        }
 | 
						|
}
 |