How to create patches for use with comboxManager.

---Chapter 1 - PRE PATCHES---

Input or PRE patches are used to apply any custom arrangements within the iptables and arptables template files. PRE patches are not used for other configuration files.

How to create (replace iptables with arptables for arptables patches):
	cd /opt/manager/running/input/comboxOnly/ for combox
	------OR-------
	cd /opt/manager/running/input/vllOnly/ for xenos

[FRESH PATCH] if iptablesVllPrePatchedTemplate does not exist or contains previously made modifications that we wish to get rid of, recreate the file with: 

	cp iptablesVllTemplate iptablesVllPrePatchedTemplate

[UPDATED PATCH] else, in case there already are modifications in place which we need to keep, just use the existing file.

Open file:
	vim iptablesVllPrePatchedTemplate
Make any necessary alterations. Save file and exit.

Create patchfile:
	diff -ruN iptablesVllTemplate iptablesVllPrePatchedTemplate > iptables-pre.patch

The patch is now ready and in place to be used by comboxManager!


---Chapter 2 - POST PATCHES---

Output or POST patches are used to apply any custom arrangements within any of the output files of comboxManager. POST patches are applied directly after generating the output files and before restarting/reloading the affected services.

How to create:
	cd /opt/manager/running/ for combox or xenos
	patch -d output/ -p1 -R < output/all-post.patch  #This will unpatch the currently patched output folder
	cp -r output outcopy

[FRESH PATCH] if no previous patch exists or it exists but it contains previously made modifications that we wish to get rid of, don't reapply the old patch.

[UPDATE PATCH] else, in case there already are modifications in place which we need to keep, reapply the old patch to our temporary outcopy:
	patch -d outcopy/ -p1 < output/all-post.patch

Edit any of the files as desired:
	vim outcopy/fileIwantToChange
Make any necessary alterations. Save file and exit.

Create patchfile:
	diff -ruN -x *.patch output/ outcopy/ > output/all-post.patch

Remove temporary outcopy folder:
	rm -rf outcopy/

The patch is now ready and in place to be used by comboxManager!
