Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nurlan
eepm
Commits
c6b0f09d
Commit
c6b0f09d
authored
Aug 13, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce epm remove-old-kernels command
parent
1c2fb25e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
4 deletions
+67
-4
epm
bin/epm
+2
-0
epm-autoremove
bin/epm-autoremove
+2
-3
epm-kernel_update
bin/epm-kernel_update
+1
-1
epm-remove_old_kernels
bin/epm-remove_old_kernels
+62
-0
No files found.
bin/epm
View file @
c6b0f09d
...
...
@@ -239,6 +239,8 @@ check_command()
;;
kernel-update|kernel-upgrade|update-kernel|upgrade-kernel
)
# HELPCMD: update system kernel to the last repo version
epm_cmd
=
kernel_update
remove-old-kernels|remove-old-kernel
)
# HELPCMD: remove old system kernels (exclude current or last two kernels)
epm_cmd
=
remove_old_kernels
;;
# Other commands
...
...
bin/epm-autoremove
View file @
c6b0f09d
...
...
@@ -64,13 +64,12 @@ epm_autoremove()
case
$DISTRNAME
in
ALTLinux
)
__epm_autoremove_altrpm
assure_exists remove-old-kernels update-kernel 0.9.9
sudocmd remove-old-kernels
docmd epm remove-old-kernels
if
which nvidia-clean-driver 2>/dev/null
;
then
sudocmd nvidia-clean-driver
fi
return
;;
*
)
...
...
bin/epm-kernel_update
View file @
c6b0f09d
...
...
@@ -30,7 +30,7 @@ epm_kernel_update()
fi
assure_exists update-kernel update-kernel 0.9.9
sudocmd update-kernel
$pkg_filenames
||
return
sudocmd remove-old-kernels
$pkg_filenames
docmd epm remove-old-kernels
$pkg_filenames
||
fatal
return
;;
esac
...
...
bin/epm-remove_old_kernels
0 → 100644
View file @
c6b0f09d
#!/bin/sh
#
# Copyright (C) 2016 Etersoft
# Copyright (C) 2016 Vitaly Lipatov <lav@etersoft.ru>
#
# 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
epm_remove_old_kernels
()
{
case
$DISTRNAME
in
ALTLinux
)
load_helper epm-query_package
if
!
__epm_query_package kernel-image
>
/dev/null
;
then
info
"No installed kernel packages, skipping cleaning"
return
fi
assure_exists update-kernel update-kernel 0.9.9
sudocmd remove-old-kernels
$pkg_filenames
return
;;
Ubuntu
)
load_helper epm-query_package
if
!
__epm_query_package linux-image
>
/dev/null
;
then
info
"No installed kernel packages, skipping cleaning"
return
fi
info
"Note: it is enough to use eepm autoremove for old kernel removing..."
info
"Check also http://ubuntuhandbook.org/index.php/2016/05/remove-old-kernels-ubuntu-16-04/"
# http://www.opennet.ru/tips/2980_ubuntu_apt_clean_kernel_packet.shtml
case
$DISTRVERSION
in
10.04|12.04|14.04|15.04|15.10
)
assure_exists purge-old-kernels bikeshed
;;
*
)
# since Ubuntu 16.04
assure_exists purge-old-kernels byobu
;;
esac
sudocmd purge-old-kernels
$pkg_filenames
return
;;
Gentoo
)
sudocmd emerge
-P
gentoo-sources
return
;;
esac
case
$PMTYPE
in
*
)
fatal
"Have no suitable command for
$PMTYPE
"
;;
esac
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment