mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 14:03:18 -07:00
* usr/bin/purge-old-kernels:
- ensure that we keep the current running kernel
This commit is contained in:
parent
63343cbce2
commit
3649eec285
2 changed files with 5 additions and 2 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -8,6 +8,8 @@ byobu (5.113) unreleased; urgency=medium
|
|||
- when selecting a session, if only empty sessions exist, then create
|
||||
a new one; the bug was that tmux considers a null string argument
|
||||
still an argument
|
||||
* usr/bin/purge-old-kernels:
|
||||
- ensure that we keep the current running kernel
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 16 Sep 2016 10:13:08 -0500
|
||||
|
||||
|
|
|
@ -44,8 +44,9 @@ while [ ! -z "$1" ]; do
|
|||
esac
|
||||
done
|
||||
|
||||
# Build our list of kernel packages to purge
|
||||
VERSIONS=$(ls -f /boot/vmlinuz-* | sed -e "s/[^\-]*-//" -e "s/-[^\-]*$//" | sort -rh)
|
||||
# Build our list of kernel packages to purge, make sure we exclude the current running kernel
|
||||
current="$(uname -r)"
|
||||
VERSIONS=$(ls -f /boot/vmlinuz-* | grep -v "$current$" | sed -e "s/[^\-]*-//" -e "s/-[^\-]*$//" | sort -rh)
|
||||
count=0
|
||||
for v in $VERSIONS; do
|
||||
count=$((count+1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue