Mageia Bugzilla – Attachment 13403 Details for
Bug 24403
Feature request : tool to remove old kernels
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Possible patch for remove-old-kernels-jarillon for Mga9
file_24403.txt (text/plain), 910 bytes, created by
Barry Jackson
on 2022-09-27 19:16:30 CEST
(
hide
)
Description:
Possible patch for remove-old-kernels-jarillon for Mga9
Filename:
MIME Type:
Creator:
Barry Jackson
Created:
2022-09-27 19:16:30 CEST
Size:
910 bytes
patch
obsolete
>--- remove-old-kernels-jarillon_o 2022-09-27 13:55:10.129695195 +0100 >+++ remove-old-kernels-jarillon 2022-09-27 18:12:00.570522310 +0100 >@@ -86,9 +86,9 @@ > export n=0; > installedKernelCounter=0; > >- rpm -qa --last "${kernelType}-[0-9]*" | while read installedKernel ; do >+ rpm -qa --last | grep "${kernelType}-[0-9]*" | while read installedKernel ; do > # Not possible, as it is kernelType-[0-9]andAnything and kernelType-lastest is not included. >- # [ $(echo ${installedKernel} | grep "latest" | wc -l ) -eq 1 ] && continue # Security >+ [ $(echo ${installedKernel} | grep "latest" | wc -l ) -eq 1 ] && continue # Security > installedKernelCounter=$((${installedKernelCounter} + 1)) > #Return to the line if there exists at least one installedKernel of this kernelType > if [[ ${installedKernelCounter} -eq 1 ]] ; then echo "" ; fi
--- remove-old-kernels-jarillon_o 2022-09-27 13:55:10.129695195 +0100 +++ remove-old-kernels-jarillon 2022-09-27 18:12:00.570522310 +0100 @@ -86,9 +86,9 @@ export n=0; installedKernelCounter=0; - rpm -qa --last "${kernelType}-[0-9]*" | while read installedKernel ; do + rpm -qa --last | grep "${kernelType}-[0-9]*" | while read installedKernel ; do # Not possible, as it is kernelType-[0-9]andAnything and kernelType-lastest is not included. - # [ $(echo ${installedKernel} | grep "latest" | wc -l ) -eq 1 ] && continue # Security + [ $(echo ${installedKernel} | grep "latest" | wc -l ) -eq 1 ] && continue # Security installedKernelCounter=$((${installedKernelCounter} + 1)) #Return to the line if there exists at least one installedKernel of this kernelType if [[ ${installedKernelCounter} -eq 1 ]] ; then echo "" ; fi
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24403
:
10776
|
10860
|
12482
|
13031
|
13107
|
13236
| 13403 |
13467
|
13489
|
13490
|
13491
|
13505