 f4af5f320a
			
		
	
	
		f4af5f320a
		
			
		
	
	
	
	
		
			
			As per discussion in https://github.com/QubesOS/qubes-issues/issues/2555#issuecomment-271415169 Signed-off-by: Lorenzo <lorenzo.grespan@gmail.com>
		
			
				
	
	
		
			24 lines
		
	
	
		
			992 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			992 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| # This script should open some GUI to install updates.
 | |
| # If you are creating package for other distribution, feel free to replace it
 | |
| # with distribution-specific script.
 | |
| 
 | |
| if [ -e /etc/redhat-release -a -x /usr/bin/dnf ]; then
 | |
|     update_cmd='dnf update --best'
 | |
| elif [ -e /etc/redhat-release -a -x /usr/bin/yum ]; then
 | |
|     update_cmd='yum update'
 | |
| elif [ -e /etc/debian_version ]; then
 | |
|     update_cmd='apt-get update && apt-get -V dist-upgrade'
 | |
| elif [ -e /etc/arch-release -a -x /usr/bin/powerpill ]; then
 | |
|     update_cmd='powerpill -Suy'
 | |
| elif [ -e /etc/arch-release ]; then
 | |
|     update_cmd='pacman -Suy'
 | |
| else
 | |
|     update_cmd='echo Unsupported distribution, install updates manually; bash -i'
 | |
| fi
 | |
| xterm -title update -e su -l -c "$update_cmd; echo Done.; test -f /var/run/qubes/this-is-templatevm && { echo Press Enter to shutdown the template, or Ctrl-C to just close this window; read x && poweroff; } ;"
 | |
| 
 | |
| # Notify dom0 about installed updates
 | |
| su -c 'service qubes-update-check start'
 |