 9c839d789f
			
		
	
	
		9c839d789f
		
			
		
	
	
	
	
		
			
			Most of them are missing quotes, `` -> $(), and -o/-a usage in conditions. Also add few directives disabling checks where were too verbose.
		
			
				
	
	
		
			11 lines
		
	
	
		
			339 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			339 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| read -r USERNAME
 | |
| cmd='echo $$ >> /tmp/qubes-session-waiter; [ ! -f /tmp/qubes-session-env ] && exec sleep inf'
 | |
| if [ "$(id -un)" = "$USERNAME" ]; then
 | |
|     sh -c "$cmd" 2>/dev/null
 | |
| else
 | |
|     su -c "$cmd" - "$USERNAME" 2> /dev/null
 | |
| fi
 | |
| # the above line is _expected_ to be terminated by a signal, don't treat this as a failure
 | |
| exit 0
 |