iscsi-target.init

来自「Linux Home Server 是专门为家庭和SOHO/SMB 设计的高性价」· INIT 代码 · 共 53 行

INIT
53
字号
#!/bin/sh /etc/rc.common# Copyright (C) 2006 OpenWrt.orgSTART=53# Copyright (C) 2006 Carlos SobrinhoPID_FILE=/var/run/iscsi_trgt.pidCONFIG_FILE=/etc/ietd.confDAEMON=/usr/sbin/ietd# Don't touch this "memsize thingy" unless you are blessed# with knowledge about it.MEM_SIZE=1048576configure_memsize(){    if [ -e /proc/sys/net/core/wmem_max ]; then        echo ${MEM_SIZE} > /proc/sys/net/core/wmem_max    fi    if [ -e /proc/sys/net/core/rmem_max ]; then        echo ${MEM_SIZE} > /proc/sys/net/core/rmem_max    fi    if [ -e /proc/sys/net/core/wmem_default ]; then        echo ${MEM_SIZE} > /proc/sys/net/core/wmem_default    fi    if [ -e /proc/sys/net/core/rmem_default ]; then        echo ${MEM_SIZE} > /proc/sys/net/core/rmem_default    fi    if [ -e /proc/sys/net/ipv4/tcp_mem ]; then        echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_mem    fi    if [ -e  /proc/sys/net/ipv4/tcp_rmem ]; then        echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_rmem    fi    if [ -e /proc/sys/net/ipv4/tcp_wmem ]; then        echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_wmem    fi}start() {	configure_memsize	/usr/sbin/ietd -c /etc/ietd.conf}stop() {	killall ietd}

⌨️ 快捷键说明

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