제목 |
172 : [Linux] Linux 커널 2.4 FD 패치 |
이름 |
산이 [홈]http://linuxchannel.net/ |
[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 $?
---------------------------------------------------- |
2007년 05월 09일 06:13:45 수(오전) from 211.212.249.68 |
File |
☆ 자료(파일:kernel-2.4-fd.patch.sh.txt)가 있는 글입니다. !!!
|