initd.gentoo
来自「ISCSI target.It can be used to make up a」· GENTOO 代码 · 共 73 行
GENTOO
73 行
#!/sbin/runscript## Start the iSCSI Enterprise Target.#PATH=/sbin:/bin:/usr/sbin:/usr/binMEM_SIZE=1048576depend(){ use net}configure_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_server(){ configure_memsize modprobe -q crc32c modprobe iscsi_trgt /usr/sbin/ietd}stop_server(){ ietadm --op delete killall ietd modprobe -r iscsi_trgt}start(){ ebegin "Starting iscsi" start_server eend 0}stop(){ ebegin "Stopping iscsi" stop_server eend 0}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?