core-agent-linux/qubes-rpc/qubes.InstallUpdatesGUI
Marek Marczykowski-Górecki 3050852cbb
Prefer powerpill to update Archlinux VM
This is the recommended way to connect through update proxy.
2016-11-12 22:30:37 +01:00

24 lines
941 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.; 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'