1 |
chrissn |
1.1 |
diff -urN e-smith-grub-2.6.1.old/root/etc/e-smith/events/actions/update-grub e-smith-grub-2.6.1/root/etc/e-smith/events/actions/update-grub |
2 |
|
|
--- e-smith-grub-2.6.1.old/root/etc/e-smith/events/actions/update-grub 2021-02-17 22:22:46.513745448 +0000 |
3 |
|
|
+++ e-smith-grub-2.6.1/root/etc/e-smith/events/actions/update-grub 2021-02-17 22:27:03.302588400 +0000 |
4 |
|
|
@@ -1,5 +1,13 @@ |
5 |
|
|
#!/usr/bin/perl |
6 |
|
|
use strict; |
7 |
|
|
use warnings; |
8 |
|
|
- system("/usr/sbin/grub2-mkconfig","-o","/boot/grub2/grub.cfg") == 0 |
9 |
|
|
- or die("Unable to update grub2\n"); |
10 |
|
|
+my $grubpath; |
11 |
|
|
+ |
12 |
|
|
+if (-e "/sys/firmware/efi") { |
13 |
|
|
+ $grubpath = "/boot/efi/EFI/centos/grub.cfg"; |
14 |
|
|
+} else { |
15 |
|
|
+ $grubpath = "/boot/grub2/grub.cfg"; |
16 |
|
|
+} |
17 |
|
|
+ |
18 |
|
|
+system("/usr/sbin/grub2-mkconfig", "-o", $grubpath) == 0 |
19 |
|
|
+ or die("Unable to update grub2\n"); |