Re: /usr/src/kernels

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

 



On 29 Aug 2023 at 8:41, stan wrote:

Date sent:      	Tue, 29 Aug 2023 08:41:58 -0700
From:           	stan <upaitag@xxxxxxxx>
To:             	users@xxxxxxxxxxxxxxxxxxxxxxx
Copies to:      	mikes@xxxxxxxx
Subject:        	Re: /usr/src/kernels
Organization:   	zohofree

> On Tue, 29 Aug 2023 18:17:34 +1000
> "Michael D. Setzer II via users" <users@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> > If someone knows of better way to accomplish the same. Seems 
> > there should be a better method, but it seems to work.
> 
> I don't know if it is better, but if you run 
> rpm -qf [directory in either /lib/modules or /usr/src/kernels]
> it will tell you the name of the rpm package that owns it, or if there
> is no owner, [directory name] is not owned by any package.
> Maybe you can use that in some way to simplify the script.

Thanks for the quick reply.. Will do that after next kernel update 
that has the orphaned sub directory. Only happens to me on 
machines that have the extra custom module that needs to be built 
for USB wifi adapter. Seems update doesn't handle there 
directores link to that.

Have modified script a little after running shelldir on script.
Latest is:
#!/bin/bash
find ./*x86_64 -maxdepth 0 >x1
y=$(find /boot/vmlinuz*x86_64 | cut -b15-100)
for a in $y; do sed -i "/$a/d" x1; done 
while read -r line; do 
	echo "$line";
	rm -rf ./"$line"/;
done <x1
rm x1

It didn't like the ls and grep and recommended read and the sed 
improved the processing.

Seems to work for me, but don't know all the variations that 
people might have. So would recommend commenting out the rm 
line or putting an echo in front to see what it would do first.

Interesting...

+------------------------------------------------------------+
 Michael D. Setzer II - Computer Science Instructor (Retired)     
 mailto:mikes@xxxxxxxx                            
 mailto:msetzerii@xxxxxxxxx
 Guam - Where America's Day Begins                        
 G4L Disk Imaging Project maintainer 
 http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+


_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux