nattpatch

来自「ipsec vpn」· 代码 · 共 64 行

TXT
64
字号
#!/bin/sh# wander through an OpenSWAN nat-t directory, creating a patch file (to stdout)# that will apply the code to a kernel source directory.## $Id: nattpatch,v 1.2 2005/04/06 17:47:44 mcr Exp $#KERN=$1shiftsource packaging/utils/kernelpatching.shpatch20=falsepatch22=falsepatch24=falsepatch26=falsecase $KERN in    2.0) patchname=os2_0; altname=fs2_0; patch20=true;;    2.2) patchname=os2_2; altname=fs2_2; patch22=true;;    2.4) patchname=os2_4; altname=fs2_4; patch24=true;;    2.6) patchname=os2_6; altname=fs2_6; patch26=true;;    *) echo "Invalid kernel patch target: $KERN"; exit 1;;esac# make sure that sort gets the right locale.LANG=C export LANGLC_ALL=C export LC_ALLfind nat-t -type f -print | grep -v CVS | egrep -v 'linux/Makefile' | sort | while read file do   base=`basename $file`  pname=`echo $file | sed -e 's,\.fs._.$,,' -e 's,\.os._.$,,'`  case $base in     TAGS) ;;    tags) ;;    .cvsignore) ;;    .*.o.flags) ;;    .\#*);;    *.o) ;;    *~) ;;    tagsfile.mak) ;;    *.$patchname.patch) cat $file;;    *.$altname.patch) cat $file;;    *.fs2_0) fakeallpatch $patch20 $file $pname ;;    *.fs2_2) fakeallpatch $patch22 $file $pname ;;    *.fs2_4) fakeallpatch $patch24 $file $pname ;;    *.fs2_6) fakeallpatch $patch26 $file $pname ;;    *.os2_0) fakeallpatch $patch20 $file $pname ;;    *.os2_2) fakeallpatch $patch22 $file $pname ;;    *.os2_4) fakeallpatch $patch24 $file $pname ;;    *.os2_6) fakeallpatch $patch26 $file $pname ;;    *.patch) ;;    *) diff -u /dev/null $file;;  esacdoneexit 0	

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?