make a copy of $RAW_PATCHNAME to “$RAW_PATCHNAME-as-downloaded” - if it doesn't exists already
otherwise restore $RAW_PATCHNAME from $RAW_PATCHNAME-as-downloaded
make a copy of $RAW_PATCHNAME to “generic.diff”
if patches are given by –vspatch-patch, expire older ones to $SRC_DIR/00-expired
if current kernel source version does not match the kernel version of the latest patch:
extract the value of the “NAME” variable from the current kernel source Makefile
replace VERSION PATCHLEVEL EXTRAVERSION and NAME inside kernel source Makefile to:
save the patched vserver patch file to $PATCHNAME