NBash

Форк
0
/
epm-kernel_update 
55 строк · 1.7 Кб
1
#!/bin/sh
2
#
3
# Copyright (C) 2013, 2016, 2017  Etersoft
4
# Copyright (C) 2013, 2016, 2017  Vitaly Lipatov <lav@etersoft.ru>
5
#
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU Affero General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Affero General Public License for more details.
15
#
16
# You should have received a copy of the GNU Affero General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18
#
19

20
load_helper epm-check_updated_repo
21
load_helper epm-sh-warmup
22

23
epm_kernel_update()
24
{
25
    warmup_bases
26

27
    update_repo_if_needed
28

29
    info "Updating system kernel to the latest version..."
30

31
    case $BASEDISTRNAME in
32
    "alt")
33
        load_helper epm-query_package
34
        if ! __epm_query_package kernel-image >/dev/null ; then
35
            info "No installed kernel packages, skipping update"
36
            return
37
        fi
38
        assure_exists update-kernel update-kernel 0.9.9
39
        sudocmd update-kernel $dryrun $(subst_option non_interactive -y) $force $interactive $reinstall $verbose "$@" || return
40
        #docmd epm remove-old-kernels "$@" || fatal
41
        return ;;
42
    esac
43

44
    case $PMTYPE in
45
    dnf-rpm)
46
        docmd epm install kernel
47
        ;;
48
    apt-*)
49
        echo "Skipping: kernel package will update during dist-upgrade"
50
        ;;
51
    *)
52
        fatal "Have no suitable command for $PMTYPE"
53
        ;;
54
    esac
55
}
56

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.