mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -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
|
- when selecting a session, if only empty sessions exist, then create
|
||||||
a new one; the bug was that tmux considers a null string argument
|
a new one; the bug was that tmux considers a null string argument
|
||||||
still an 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
|
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 16 Sep 2016 10:13:08 -0500
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,9 @@ while [ ! -z "$1" ]; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# Build our list of kernel packages to purge
|
# Build our list of kernel packages to purge, make sure we exclude the current running kernel
|
||||||
VERSIONS=$(ls -f /boot/vmlinuz-* | sed -e "s/[^\-]*-//" -e "s/-[^\-]*$//" | sort -rh)
|
current="$(uname -r)"
|
||||||
|
VERSIONS=$(ls -f /boot/vmlinuz-* | grep -v "$current$" | sed -e "s/[^\-]*-//" -e "s/-[^\-]*$//" | sort -rh)
|
||||||
count=0
|
count=0
|
||||||
for v in $VERSIONS; do
|
for v in $VERSIONS; do
|
||||||
count=$((count+1))
|
count=$((count+1))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue