Re: [PATCH] scripts: prune-kernel:remove old kernels and modules dir from system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/30/19 9:52 PM, Bhaskar Chowdhury wrote:
>>>> That 'rm' doesn't remove any files.  Compare what remove_old_kernel() does.
>>> No,it is not using that function rather take the parameter from the
>>> commandline and get into boot dir match with it and remove it.
>>
>> But it doesn't do that.  I tested it.  It should be more like what
>> rmeove_old_kernel() does:
>>
>>         rm -If vmlinuz-$kernel_ver System.map-$kernel_ver config-$kernel_ver
>>
>> and if not, please explain why not.
> Okay, again some uniformity missing in the code, I would like to your
> suggested method,i.e call remove_old_kernel to do the job instead of depending on individual kernel.

The simplest thing to do is set kernel_version=$kernel_ver
and then call remove_old_kernel().
And set modules_version=$modules_dir_name and call remove_old_modules_dir().

But it would be cleaner to pass a parameter (kernel_version) to the
remove_old_kernel() function and to pass a parameter (modules_dir) to the
remove_old_modules_dir() function.


-- 
~Randy




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux