diff options
Diffstat (limited to 'share/hydractl/upgrade')
-rwxr-xr-x | share/hydractl/upgrade | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/share/hydractl/upgrade b/share/hydractl/upgrade index cc3e985..d0ccde9 100755 --- a/share/hydractl/upgrade +++ b/share/hydractl/upgrade @@ -21,9 +21,18 @@ if [ "`whoami`" != 'root' ]; then sudo="sudo" fi +# Issue upgrade if ! $sudo lsof /var/lib/dpkg/lock &> /dev/null; then $sudo aptitude update $sudo aptitude safe-upgrade -y else echo "Apt is locked, aborting." fi + +# Upgrade all chroots +hydractl chroot-upgrade + +# Cleanup +if [ "$2" == "clean" ]; then + $sudo aptitude clean +fi |