diff options
author | Anthony G. Basile <basile@opensource.dyc.edu> | 2010-07-10 21:52:11 -0400 |
---|---|---|
committer | Anthony G. Basile <basile@opensource.dyc.edu> | 2010-07-10 21:52:11 -0400 |
commit | 1e306feb6a79a29cea05362232bd56bcf7b5d160 (patch) | |
tree | c9f54833d20e70663dfae1b030db4b443d30c40b | |
parent | Updated to Grsec/PaX (diff) | |
download | hardened-patchset-1e306feb6a79a29cea05362232bd56bcf7b5d160.tar.gz hardened-patchset-1e306feb6a79a29cea05362232bd56bcf7b5d160.tar.bz2 hardened-patchset-1e306feb6a79a29cea05362232bd56bcf7b5d160.zip |
Script to apply patches
-rwxr-xr-x | ap.patch.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ap.patch.sh b/ap.patch.sh new file mode 100755 index 0000000..957bebd --- /dev/null +++ b/ap.patch.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +SCRIPT="${0}" +KMAJOR="${1}" +PATCHSET="/root/hardened-patchset/${KMAJOR}" + +if [[ -z "${KMAJOR}" ]] ; then + echo "Usage: ${SCRIPT} <kernel_major>" + exit +fi + +if [[ ! -d ${PATCHSET} ]] ; then + echo "Patchset ${KMAJOR} doesn't exist" + exit +fi + +for p in $(ls ${PATCHSET}) ; do + if [[ ${p#0000} == $p ]] ; then + echo $p + patch -p 1 --dry-run < ${PATCHSET}/$p + echo "Cont?" + read n + patch -p 1 < ${PATCHSET}/$p + fi +done + |