Commit 1d41c194 authored by Vitaly Lipatov's avatar Vitaly Lipatov

upgrade: add --auto support for apt and yum/dnf

parent de9d2752
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2012,2014 Etersoft # Copyright (C) 2012, 2014, 2016 Etersoft
# Copyright (C) 2012,2014 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2012, 2014, 2016 Vitaly Lipatov <lav@etersoft.ru>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
...@@ -32,19 +32,21 @@ epm_upgrade() ...@@ -32,19 +32,21 @@ epm_upgrade()
case $PMTYPE in case $PMTYPE in
apt-rpm|apt-dpkg) apt-rpm|apt-dpkg)
# non_interactive local APTOPTIONS="$(subst_option non_interactive -y)"
# Функцию добавления параметра при условии # Функцию добавления параметра при условии
CMD="apt-get dist-upgrade $noremove" CMD="apt-get $APTOPTIONS dist-upgrade $noremove"
;; ;;
aptitude-dpkg) aptitude-dpkg)
CMD="aptitude dist-upgrade" CMD="aptitude dist-upgrade"
;; ;;
yum-rpm) yum-rpm)
local OPTIONS="$(subst_option non_interactive -y)"
# can do update repobase automagically # can do update repobase automagically
CMD="yum update" CMD="yum $OPTIONS update"
;; ;;
dnf-rpm) dnf-rpm)
CMD="dnf distro-sync" local OPTIONS="$(subst_option non_interactive -y)"
CMD="dnf $OPTIONS distro-sync"
;; ;;
snappy) snappy)
CMD="snappy update" CMD="snappy update"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment