Ai
1 Star 0 Fork 0

zip/rtpengine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
patch-kernel 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
Guillem Jover 提交于 2017-11-09 00:45 +08:00 . TT#24097 Fix shell quoting
#!/bin/bash
if test "$1" != magic; then
echo
echo "Don't run this script manually, instead run:"
echo " make patch KERNEL=/path/to/kernel/sources"
echo
exit 1
fi
if test -z "$3"; then
echo
echo "Usage:"
echo " make patch KERNEL=/path/to/kernel/sources"
echo
exit 1
fi
KERN=$3
for x in . include/linux/netfilter/ net/netfilter/Kconfig net/netfilter/Makefile; do
if ! test -e "$KERN"/"$x"; then
echo "I don't recognize $KERN as a kernel source tree"
exit 1
fi
done
set -e
cp -v xt_RTPENGINE.h "$KERN"/include/linux/netfilter/
cp -v xt_RTPENGINE.c "$KERN"/net/netfilter/
if ! grep -q CONFIG_NETFILTER_XT_TARGET_RTPENGINE "$KERN"/net/netfilter/Makefile; then
(
echo
echo "EXTRA_CFLAGS += -DRTPENGINE_VERSION=\"\\\"$4\\\"\""
echo "obj-\$(CONFIG_NETFILTER_XT_TARGET_RTPENGINE) += xt_RTPENGINE.o"
) >> "$KERN"/net/netfilter/Makefile
fi
if ! grep -q Kconfig\\.rtpengine "$KERN"/net/netfilter/Kconfig; then
cat >> "$KERN"/net/netfilter/Kconfig.rtpengine << \__EOF
config NETFILTER_XT_TARGET_RTPENGINE
tristate "Sipwise NGCP RTPENGINE target support"
depends on IP_NF_FILTER
help
Sipwise NGCP rtpengine kernel support
To compile it as a module, choose M here. If unsure, say N.
__EOF
echo 'source "net/netfilter/Kconfig.rtpengine"' >> "$KERN"/net/netfilter/Kconfig
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zip/rtpengine.git
git@gitee.com:zip/rtpengine.git
zip
rtpengine
rtpengine
master

搜索帮助