Patching PVE on update

AngryAnt

Member
Mar 13, 2021
18
8
8
I have a small patch for PVE (adds a 10 minute timeout to booting VMs during backup), which I have been manually applying and re-applying after each PVE update.

The re-applying is getting a bit tedious, so I was wondering if anyone might have suggestions on how to save this patch for auto-application whenever PVE gets updated?
 
You can create an APT hook that automatically runs your patch routing. Create a file in /etc/apt/apt.conf.d/<yourname>:

Code:
DPkg::Post-Invoke {"/usr/bin/test -e </path/to/your/command.sh> && </path/to/your/command.sh> || true" ; };

In your command you then can check if you need to apply your patch and then apply it (or not).