 5bf260891a
			
		
	
	
		5bf260891a
		
	
	
	
	
		
			
			Do not print error message when no package downloaded. Also some more covenient usage when dowloading new packages (implied --resolve --nogui).
		
			
				
	
	
		
			27 lines
		
	
	
		
			732 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			732 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| UPDATEVM=`qvm-get-updatevm`
 | |
| if [ -z "$UPDATEVM" ]; then
 | |
|     echo "UpdateVM not set, exiting"
 | |
|     exit 1
 | |
| fi
 | |
| 
 | |
| echo "Checking for dom0 updates"
 | |
| 
 | |
| # Start VM if not running already
 | |
| qvm-run -a $UPDATEVM true || exit 1
 | |
| /usr/lib/qubes/sync_rpmdb_updatevm.sh || exit 1
 | |
| qvm-run --pass_io $UPDATEVM "/usr/lib/qubes/qubes_download_dom0_updates.sh $*" || exit 1
 | |
| # Wait for download completed
 | |
| while pidof -x qubes-receive-updates >/dev/null; do sleep 0.5; done
 | |
| if [ $# -gt 0 ]; then
 | |
|     echo "You can now install downloaded packages (eg. using yum)"
 | |
| elif [ -f /var/lib/qubes/updates/repodata/repomd.xml ]; then
 | |
|     yum check-update
 | |
|     if [ $? -eq 100 ]; then
 | |
|         gpk-update-viewer
 | |
|     fi
 | |
| else
 | |
|     echo "No updates avaliable"
 | |
| fi
 |