* [PATCH] :scripts: prune-kernel : prunning kernel generalize way
@ 2019-10-15 14:55 Bhaskar Chowdhury
2019-10-15 23:03 ` Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Bhaskar Chowdhury @ 2019-10-15 14:55 UTC (permalink / raw)
To: yamada.masahiro, michal.lkml
Cc: linux-kbuild, linux-kernel, rdunlap, Bhaskar Chowdhury
This patch will remove old kernels from system selective way.
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
scripts/prune-kernel | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/scripts/prune-kernel b/scripts/prune-kernel
index 74143f229f84..28fae6c91218 100755
--- a/scripts/prune-kernel
+++ b/scripts/prune-kernel
@@ -33,7 +33,7 @@ printf "\t\n Enlist the installed kernels \n\n\n"
cd $boot_dir && pwd
#Bash experts not recomend to run ls inside script,but you can by running that too
-# ls -1 vmlinuz-*
+# ls -1 vmlinuz-*
#This is the recommended way , little complex but that's what people want to see!
@@ -42,10 +42,10 @@ find $boot_dir -name "vmlinuz-*" -type f -print0 -exec ls -1 {} \;
printf "\n\n\n Well, we need to purge some kernel to gain some space.\n\n\n"
-printf "Please give the kernel version to remove: %s"
+printf "Please give the kernel version to remove: %s"
read kernel_version
-remove_old_kernel
+remove_old_kernel
printf "\n\n Remove associated modules too ... \n\n"
@@ -54,7 +54,7 @@ cd $modules_dir && pwd
printf "\n\n\n Enlist the installed modules \n\n\n"
#This is (-1) minus one not l(el)
-# ls -1
+# ls -1
find $modules_dir -name "$kernel_version-*" -type f -print0 -exec ls -1 {} \;
@@ -66,14 +66,14 @@ rm -rf $modules_version
printf "\n\n Done \n\n"
printf "\n\n Want to remove another?[Yn] : %s"
-read response
+read response
if [[ $response == "Y" ]]; then
- printf "Please give another version to remove : %s"
+ printf "Please give another version to remove : %s"
read kernel_version
-remove_old_kernel
+remove_old_kernel
elif [[ $response == "n" ]]; then
@@ -81,4 +81,4 @@ elif [[ $response == "n" ]]; then
fi
-exit 0
+exit 0
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] :scripts: prune-kernel : prunning kernel generalize way
2019-10-15 14:55 [PATCH] :scripts: prune-kernel : prunning kernel generalize way Bhaskar Chowdhury
@ 2019-10-15 23:03 ` Randy Dunlap
2019-10-16 1:36 ` Bhaskar Chowdhury
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2019-10-15 23:03 UTC (permalink / raw)
To: Bhaskar Chowdhury, yamada.masahiro, michal.lkml
Cc: linux-kbuild, linux-kernel
Subject: s/prunning/pruning/
Subject: s/:scripts:/scripts:/
On 10/15/19 7:55 AM, Bhaskar Chowdhury wrote:
> This patch will remove old kernels from system selective way.
in a selective way.
>
> Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
> ---
> scripts/prune-kernel | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/scripts/prune-kernel b/scripts/prune-kernel
> index 74143f229f84..28fae6c91218 100755
> --- a/scripts/prune-kernel
> +++ b/scripts/prune-kernel
> @@ -33,7 +33,7 @@ printf "\t\n Enlist the installed kernels \n\n\n"
> cd $boot_dir && pwd
>
> #Bash experts not recomend to run ls inside script,but you can by running that too
> -# ls -1 vmlinuz-*
> +# ls -1 vmlinuz-*
>
> #This is the recommended way , little complex but that's what people want to see!
>
> @@ -42,10 +42,10 @@ find $boot_dir -name "vmlinuz-*" -type f -print0 -exec ls -1 {} \;
> printf "\n\n\n Well, we need to purge some kernel to gain some space.\n\n\n"
>
>
> -printf "Please give the kernel version to remove: %s"
> +printf "Please give the kernel version to remove: %s"
> read kernel_version
>
> -remove_old_kernel
> +remove_old_kernel
>
> printf "\n\n Remove associated modules too ... \n\n"
>
> @@ -54,7 +54,7 @@ cd $modules_dir && pwd
> printf "\n\n\n Enlist the installed modules \n\n\n"
>
> #This is (-1) minus one not l(el)
> -# ls -1
> +# ls -1
>
> find $modules_dir -name "$kernel_version-*" -type f -print0 -exec ls -1 {} \;
>
> @@ -66,14 +66,14 @@ rm -rf $modules_version
> printf "\n\n Done \n\n"
>
> printf "\n\n Want to remove another?[Yn] : %s"
> -read response
> +read response
>
>
> if [[ $response == "Y" ]]; then
> - printf "Please give another version to remove : %s"
> + printf "Please give another version to remove : %s"
> read kernel_version
>
> -remove_old_kernel
> +remove_old_kernel
>
> elif [[ $response == "n" ]]; then
>
> @@ -81,4 +81,4 @@ elif [[ $response == "n" ]]; then
>
> fi
>
> -exit 0
> +exit 0
> --
> 2.21.0
>
Trying to apply this patch with 'patch --verbose' says:
checking file scripts/prune-kernel
Using Plan A...
Hunk #1 FAILED at 33.
Hunk #2 FAILED at 42.
Hunk #3 FAILED at 54.
Hunk #4 FAILED at 66.
Hunk #5 FAILED at 81.
5 out of 5 hunks FAILED
Hmm... Ignoring the trailing garbage.
done
Those + and - lines with the same content don't make any sense.
And probably Cc: the author of the script:
J. Bruce Fields <bfields@fieldses.org>
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] :scripts: prune-kernel : prunning kernel generalize way
2019-10-15 23:03 ` Randy Dunlap
@ 2019-10-16 1:36 ` Bhaskar Chowdhury
2019-10-16 2:23 ` Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Bhaskar Chowdhury @ 2019-10-16 1:36 UTC (permalink / raw)
To: Randy Dunlap
Cc: yamada.masahiro, michal.lkml, linux-kbuild, linux-kernel, bfields
[-- Attachment #1: Type: text/plain, Size: 3088 bytes --]
On 16:03 Tue 15 Oct 2019, Randy Dunlap wrote:
>Subject: s/prunning/pruning/
>Subject: s/:scripts:/scripts:/
>
>On 10/15/19 7:55 AM, Bhaskar Chowdhury wrote:
>> This patch will remove old kernels from system selective way.
>
> in a selective way.
>
>>
>> Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
>> ---
>> scripts/prune-kernel | 16 ++++++++--------
>> 1 file changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/scripts/prune-kernel b/scripts/prune-kernel
>> index 74143f229f84..28fae6c91218 100755
>> --- a/scripts/prune-kernel
>> +++ b/scripts/prune-kernel
>> @@ -33,7 +33,7 @@ printf "\t\n Enlist the installed kernels \n\n\n"
>> cd $boot_dir && pwd
>>
>> #Bash experts not recomend to run ls inside script,but you can by running that too
>> -# ls -1 vmlinuz-*
>> +# ls -1 vmlinuz-*
>>
>> #This is the recommended way , little complex but that's what people want to see!
>>
>> @@ -42,10 +42,10 @@ find $boot_dir -name "vmlinuz-*" -type f -print0 -exec ls -1 {} \;
>> printf "\n\n\n Well, we need to purge some kernel to gain some space.\n\n\n"
>>
>>
>> -printf "Please give the kernel version to remove: %s"
>> +printf "Please give the kernel version to remove: %s"
>> read kernel_version
>>
>> -remove_old_kernel
>> +remove_old_kernel
>>
>> printf "\n\n Remove associated modules too ... \n\n"
>>
>> @@ -54,7 +54,7 @@ cd $modules_dir && pwd
>> printf "\n\n\n Enlist the installed modules \n\n\n"
>>
>> #This is (-1) minus one not l(el)
>> -# ls -1
>> +# ls -1
>>
>> find $modules_dir -name "$kernel_version-*" -type f -print0 -exec ls -1 {} \;
>>
>> @@ -66,14 +66,14 @@ rm -rf $modules_version
>> printf "\n\n Done \n\n"
>>
>> printf "\n\n Want to remove another?[Yn] : %s"
>> -read response
>> +read response
>>
>>
>> if [[ $response == "Y" ]]; then
>> - printf "Please give another version to remove : %s"
>> + printf "Please give another version to remove : %s"
>> read kernel_version
>>
>> -remove_old_kernel
>> +remove_old_kernel
>>
>> elif [[ $response == "n" ]]; then
>>
>> @@ -81,4 +81,4 @@ elif [[ $response == "n" ]]; then
>>
>> fi
>>
>> -exit 0
>> +exit 0
>> --
>> 2.21.0
>>
>
>Trying to apply this patch with 'patch --verbose' says:
>
>checking file scripts/prune-kernel
>Using Plan A...
>Hunk #1 FAILED at 33.
>Hunk #2 FAILED at 42.
>Hunk #3 FAILED at 54.
>Hunk #4 FAILED at 66.
>Hunk #5 FAILED at 81.
>5 out of 5 hunks FAILED
>Hmm... Ignoring the trailing garbage.
>done
>
>
>Those + and - lines with the same content don't make any sense.
>
>And probably Cc: the author of the script:
>J. Bruce Fields <bfields@fieldses.org>
>
>--
>~Randy
Thank you Randy, silly mistakes creeps in...my bad ...will correct that
and resend.
BTW I haven't found Bruce's name anywhere...where did you get it? Or did I
miss the obvious??
Ran against get_maintainers and it only throw a open list , no other
names.So kinda, stump by that.
Time to redo it again...huh
Thanks,
Bhaskar
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] :scripts: prune-kernel : prunning kernel generalize way
2019-10-16 1:36 ` Bhaskar Chowdhury
@ 2019-10-16 2:23 ` Randy Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2019-10-16 2:23 UTC (permalink / raw)
To: Bhaskar Chowdhury
Cc: yamada.masahiro, michal.lkml, linux-kbuild, linux-kernel, bfields
On 10/15/19 6:36 PM, Bhaskar Chowdhury wrote:
> On 16:03 Tue 15 Oct 2019, Randy Dunlap wrote:
>> Subject: s/prunning/pruning/
>> Subject: s/:scripts:/scripts:/
>>
>> On 10/15/19 7:55 AM, Bhaskar Chowdhury wrote:
>>> This patch will remove old kernels from system selective way.
>>
>> in a selective way.
>>
>>>
>>> Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
>>> ---
>>> scripts/prune-kernel | 16 ++++++++--------
>>> 1 file changed, 8 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/scripts/prune-kernel b/scripts/prune-kernel
>>> index 74143f229f84..28fae6c91218 100755
>>> --- a/scripts/prune-kernel
>>> +++ b/scripts/prune-kernel
>>> @@ -33,7 +33,7 @@ printf "\t\n Enlist the installed kernels \n\n\n"
>>> cd $boot_dir && pwd
>>>
>>> #Bash experts not recomend to run ls inside script,but you can by running that too
>>> -# ls -1 vmlinuz-*
>>> +# ls -1 vmlinuz-*
>>>
>>> #This is the recommended way , little complex but that's what people want to see!
>>>
>>> @@ -42,10 +42,10 @@ find $boot_dir -name "vmlinuz-*" -type f -print0 -exec ls -1 {} \;
>>> printf "\n\n\n Well, we need to purge some kernel to gain some space.\n\n\n"
>>>
>>>
>>> -printf "Please give the kernel version to remove: %s"
>>> +printf "Please give the kernel version to remove: %s"
>>> read kernel_version
>>>
>>> -remove_old_kernel
>>> +remove_old_kernel
>>>
>>> printf "\n\n Remove associated modules too ... \n\n"
>>>
>>> @@ -54,7 +54,7 @@ cd $modules_dir && pwd
>>> printf "\n\n\n Enlist the installed modules \n\n\n"
>>>
>>> #This is (-1) minus one not l(el)
>>> -# ls -1
>>> +# ls -1
>>>
>>> find $modules_dir -name "$kernel_version-*" -type f -print0 -exec ls -1 {} \;
>>>
>>> @@ -66,14 +66,14 @@ rm -rf $modules_version
>>> printf "\n\n Done \n\n"
>>>
>>> printf "\n\n Want to remove another?[Yn] : %s"
>>> -read response
>>> +read response
>>>
>>>
>>> if [[ $response == "Y" ]]; then
>>> - printf "Please give another version to remove : %s"
>>> + printf "Please give another version to remove : %s"
>>> read kernel_version
>>>
>>> -remove_old_kernel
>>> +remove_old_kernel
>>>
>>> elif [[ $response == "n" ]]; then
>>>
>>> @@ -81,4 +81,4 @@ elif [[ $response == "n" ]]; then
>>>
>>> fi
>>>
>>> -exit 0
>>> +exit 0
>>> --
>>> 2.21.0
>>>
>>
>> Trying to apply this patch with 'patch --verbose' says:
>>
>> checking file scripts/prune-kernel
>> Using Plan A...
>> Hunk #1 FAILED at 33.
>> Hunk #2 FAILED at 42.
>> Hunk #3 FAILED at 54.
>> Hunk #4 FAILED at 66.
>> Hunk #5 FAILED at 81.
>> 5 out of 5 hunks FAILED
>> Hmm... Ignoring the trailing garbage.
>> done
>>
>>
>> Those + and - lines with the same content don't make any sense.
>>
>> And probably Cc: the author of the script:
>> J. Bruce Fields <bfields@fieldses.org>
>>
>> --
>> ~Randy
>
> Thank you Randy, silly mistakes creeps in...my bad ...will correct that
> and resend.
> BTW I haven't found Bruce's name anywhere...where did you get it? Or did I
> miss the obvious??
It's in the git repository history for this file.
> Ran against get_maintainers and it only throw a open list , no other
> names.So kinda, stump by that.> Time to redo it again...huh
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-16 2:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 14:55 [PATCH] :scripts: prune-kernel : prunning kernel generalize way Bhaskar Chowdhury
2019-10-15 23:03 ` Randy Dunlap
2019-10-16 1:36 ` Bhaskar Chowdhury
2019-10-16 2:23 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).