Commit graph

54 commits

Author SHA1 Message Date
HikariKnight
3f934351fc fix: correctly detect kernel 6.10 and newer as a newer kernel 2024-08-10 08:57:54 +02:00
HikariKnight
380c875213 fix: CopyToSystem now correctly uses ExecAndLogSudo 2024-07-27 17:49:46 +02:00
kayos
6c48a35180
Feat: conditional permissions behavior (#28)
* Fix: don't need sudo if we're root + other aesthetics

* Heavy refactoring, see PR #28

* Fix: avoid silent fatalities

demo: https://tcp.ac/i/JMSUc.gif

* Fix: Inverse check on `IsRoot`

* D.R.Y: check for permissions error in `common.ErrorCheck`

Reduce cognitive complexity.

* Fix: Issue with copying

* Resolve https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646535918

* Resolve https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646606680 and https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646594105

* Revert "Resolve https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646606680 and https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646594105"

This reverts commit ce15213009.

* Resolve https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646730751
2024-07-27 17:38:39 +02:00
HikariKnight
0273aabecc chore: change quickemu folder to qemu folder 2024-06-15 01:51:57 +02:00
HikariKnight
f856dde035 fix: Improve grub2 configuration logic 2024-03-20 18:58:10 +01:00
HikariKnight
f5c71ee915 chore: logging output cleanup 2024-03-20 17:51:30 +01:00
HikariKnight
74fa194a30 fix: correctly write to log when a kernel older than 6.2 is detected 2024-03-17 00:36:59 +01:00
HikariKnight
46376435ef fix: correctly handle empty MODULES=() in mkinitcpio 2024-03-14 15:30:26 +01:00
HikariKnight
f7c98e67ca Do not create an empty config/etc/default/grub file if bootloader is grubby 2024-01-01 12:19:44 +01:00
HikariKnight
475543840e Fix duplication of rd.driver.pre=vfio_pci when using dracut 2024-01-01 09:44:17 +01:00
HikariKnight
60fa705b2d Fix output from grub-mkconfig 2024-01-01 09:19:21 +01:00
HikariKnight
b3c17b6f90 Tidy up debug.log formating 2023-12-26 19:20:30 +01:00
HikariKnight
82fec3ab58 refactor and start adding actual functionality 2023-12-26 19:20:30 +01:00
HikariKnight
9efa0ee226 fix logger formating 2023-12-26 19:20:29 +01:00
HikariKnight
4c99baeed8 Finish writing the apply changes functions 2023-12-26 19:20:29 +01:00
HikariKnight
e7c61c564e Start working on applying the config to the system 2023-12-26 19:20:29 +01:00
HikariKnight
7b305a87d2 implement Set_Grub 2023-12-26 19:20:29 +01:00
HikariKnight
7b8923f68e Add missing error checks 2023-12-26 19:20:29 +01:00
HikariKnight
84befa6f85 Move some code around to places it makes more sense to do the tasks given 2023-12-26 19:20:29 +01:00
HikariKnight
68aec7fdb8 Prevent appending multiple times to the file 2023-12-26 19:20:29 +01:00
HikariKnight
ff5d20f4f9 Implement grubby support 2023-12-26 19:20:29 +01:00
HikariKnight
7081bfa8d7 Implement Set_Kernelstub and attempt to elevate to sudo using STDIN and then attempt to remove the password from the program memory 2023-12-26 19:20:29 +01:00
HikariKnight
ca992bf864 Fixes a bug that would add rd.driver=vfio_pci to the kernel args twice 2023-12-26 19:20:29 +01:00
HikariKnight
300ca653cc implement backup system 2023-12-26 19:20:29 +01:00
HikariKnight
798427280b Add documentation 2023-12-26 19:20:29 +01:00
HikariKnight
639d056abe Add logger debug output 2023-12-26 19:20:29 +01:00
HikariKnight
27a52cda1f update vbios dumper script 2023-12-26 19:20:29 +01:00
HikariKnight
7f5a75dd94 Start logging to file for debugging 2023-12-26 19:20:29 +01:00
HikariKnight
4ed469b578 Add a failure message to the script 2023-12-26 19:20:29 +01:00
HikariKnight
f0cd5e408d update the generated script 2023-12-26 19:20:29 +01:00
HikariKnight
86b5ce77e6 move vbios_dumper into configs 2023-12-26 19:20:29 +01:00
HikariKnight
45c7dcf7a3 Add support for mkinitcpio config 2023-12-26 19:20:29 +01:00
HikariKnight
a6fddcd683 Make sure we always start with a new file 2023-12-26 19:20:29 +01:00
HikariKnight
e93d215669 make generating the module list its own function and fix minor things 2023-12-26 19:20:29 +01:00
HikariKnight
18d9d928e5 add dracut support and make it possible to change your video disable choice 2023-12-26 19:20:29 +01:00
HikariKnight
5f38467e23 Move disableVFIOVideo into its own file 2023-12-26 19:20:29 +01:00
HikariKnight
9d131fa566 implement set_Modprobe 2023-12-26 19:20:29 +01:00
HikariKnight
ca1eedad1c add comments and change cmdline file to kernel_args 2023-12-26 19:20:29 +01:00
HikariKnight
7affa8d06d Prepare a set_modprobe function 2023-12-26 19:20:29 +01:00
HikariKnight
8a2ddeb261 Fix config struct exports 2023-12-26 19:20:29 +01:00
HikariKnight
c64da46cce make empty package for modprobe when i get to the point of writing this 2023-12-26 19:20:29 +01:00
HikariKnight
583ccc1586 fix generating initramfs-tools modules file 2023-12-26 19:20:29 +01:00
HikariKnight
f38d3f3445 remove extra line from config/initramfs-tools/modules 2023-12-26 19:20:29 +01:00
HikariKnight
f3032966b9 move over to using fileio for checking for files existing 2023-12-26 19:20:29 +01:00
HikariKnight
c3a1639dee Add function for setting cmdline and writing the config/cmdline file 2023-12-26 19:20:29 +01:00
HikariKnight
388ba638bd add cmdline to config and fix fileio append 2023-12-26 19:20:29 +01:00
HikariKnight
f5116648e6 futureproofing function names for the different initramfs systems 2023-12-26 19:20:29 +01:00
HikariKnight
efd8ae0f97 add TODO 2023-12-26 19:20:29 +01:00
HikariKnight
3ac5958015 change to use fileio and also finish writing the module manipulation for initramfstools 2023-12-26 19:20:29 +01:00
HikariKnight
a2e641f867 port more of the bash config 2023-12-26 19:20:29 +01:00