Question regarding bash scripting

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

 



hallo
I usallay run vanilla kernels and build them with a suffix "_MY" to save some works when cleaning /boot if that kernels gets outdated and a new one gets installed.

/boot looks like this
ll /boot :
...
-rw-------. 1 root root  20M 22. Jun 15:04 initramfs-5.1.14_MY.img
-rw-r--r--. 1 root root 4,7M 22. Jun 15:04 System.map-5.1.14_MY
-rw-r--r--. 1 root root  15M 22. Jun 15:04 vmlinuz-5.1.14_MY
...
and
ll /boot/loader/ :
drwx------. 2 root root 4,0K 22. Jun 15:04 entries

and
sudo ls -l /boot/loader/entries/ :
-rw-r--r--. 1 root root 242 22. Jun 15:04 0637b2e09df64d90bd0c13dc10d1da70-5.1.14_MY.conf

to clean /boot a use a script:

#!/bin/bash
set -vx;
sudo rm -rf /boot/loader/entries/*MY*;
sudo rm -rf /boot/*MY* /lib/modules/*MY*; 
sudo grub2-mkconfig -o /boot/grub2/grub.cfg;


and now my problem:
the first sudo rm -rfv command does NOTHING, means the loader entry is still there and I need to rm it by hand.
whereas the second rm command does what I espect.

What I'm doing wrong / where is the/my bug ?
_______________________________________________
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



[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