Fix: Update mkinitcpio command to use -P option

use ```mkinitcpio -P``` instead of hardcoded ```mkintcpio -p linux``` 
(fix suggested by cube and validated by copilot)
(manpage for mkinitcpio says
```-P, --allpresets
         Process all presets contained in /etc/mkinitcpio.d. See the -p option for more detail about presets.
-p, --preset preset
         Build initramfs image(s) according to specified preset. This  may  be  a  file  in  /etc/mkinitcpio.d
         (without the .preset extension) or a full, absolute path to a file. This option may be specified mul‐
         tiple times to process multiple presets.```
This does seem to remove hard coded path
This commit is contained in:
iFixit 2026-07-03 14:35:17 -07:00 committed by GitHub
parent e649f69d1b
commit 76d5360dbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -30,8 +30,8 @@ function ignore_msrs_always() {
sudo update-initramfs -k all -u
;;
2)
sudo mkinitcpio -p linux
echo "Ran mkinitcpio -p linux"
sudo mkinitcpio -P
echo "Ran mkinitcpio -P"
;;
3)
echo "ERROR! User does not have update-initramfs or mkinitcpio installed, please find out respective utility to update/regenrate intiramfs."