172 번 글: [Linux] Linux 커널 2.4 FD 패치 |
글쓴이: 산이
[홈페이지]
|
글쓴날: 2007년 05월 09일 06:13:45 수(오전) |
조회: 3661 |
2 KB(2,310 Bytes)
|
파일명: kernel-2.4-fd.patch.sh.txt
|
[Linux] Linux 커널 2.4 FD 패치
----------------------------------------------------
#!/bin/sh
#
# -- Linux kernel 2.4 FD patch
# -- san2@2005.10.20
#
# -- http://vce.ce-lab.net/doc/vce/en/linuxtune.html
#
[ -s linux/include/linux/fs.h ] &&
{
cp -f linux/include/linux/fs.h linux/include/linux/fs.h.orig
sed -e "s/^#define INR_OPEN[[:space:]]\+[0-9]\+/#define INR_OPEN
8192/" \
-e "s/^#define NR_FILE[[:space:]]\+[0-9]\+/#define NR_FILE 16384/" \
< linux/include/linux/fs.h linux/include/linux/fs.h.orig \
> linux/include/linux/fs.h
echo
echo linux/include/linux/fs.h
grep "^#define INR_OPEN\|^#define NR_FILE" <
linux/include/linux/fs.h
}
[ -s linux/include/linux/limits.h ] &&
{
cp -f linux/include/linux/limits.h linux/include/linux/limits.h.orig
sed -e "s/^#define NR_OPEN[[:space:]]\+[0-9]\+/#define NR_OPEN 16384/"
\
-e "s/^#define OPEN_MAX[[:space:]]\+[0-9]\+/#define OPEN_MAX 8192/" \
< linux/include/linux/limits.h.orig \
> linux/include/linux/limits.h
echo
echo linux/include/linux/limits.h
grep "^#define NR_OPEN\|^#define OPEN_MAX" <
linux/include/linux/limits.h
}
[ -s linux/include/linux/posix_types.h ] &&
{
cp -f linux/include/linux/posix_types.h linux/include/linux/posix_types.h.orig
sed -e "s/^#define __FD_SETSIZE[[:space:]]\+[0-9]\+/#define __FD_SETSIZE
8192/" \
-e "s/^#define OPEN_MAX[[:space:]]\+[0-9]\+/#define OPEN_MAX 8192/" \
< linux/include/linux/posix_types.h.orig \
> linux/include/linux/posix_types.h
echo
echo linux/include/linux/posix_types.h
grep "^#define __FD_SETSIZE\|^#define OPEN_MAX" <
linux/include/linux/posix_types.h
}
[ -s /usr/include/bits/types.h ] &&
{
cp -f /usr/include/bits/types.h /usr/include/bits/types.h.orig
sed -e "s/^#define[[:space:]]\+__FD_SETSIZE[[:space:]]\+[0-9]\+/#define
__FD_SETSIZE 8192/" \
< /usr/include/bits/types.h.orig \
> /usr/include/bits/types.h
echo
echo /usr/include/bits/types.h
grep "__FD_SETSIZE" < /usr/include/bits/types.h
}
[ -s /usr/include/bits/typesizes.h ] &&
{
cp -f /usr/include/bits/typesizes.h /usr/include/bits/typesizes.h.orig
sed -e "s/^#define[[:space:]]\+__FD_SETSIZE[[:space:]]\+[0-9]\+/#define
__FD_SETSIZE 8192/" \
< /usr/include/bits/typesizes.h.orig \
> /usr/include/bits/typesizes.h
echo
echo /usr/include/bits/typesizes.h
grep "__FD_SETSIZE" < /usr/include/bits/typesizes.h
}
exit $?
----------------------------------------------------
|
이전글 : [Linux] file-max
다음글 : [BASH] HISTTIMEFORMAT
|
from 211.212.249.68
JS(Redhands)Board 0.4 +@
|