Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37815091
en ru br
Репозитории ALT
D:0.4.15-alt0.1
5.1: 0.4.17-alt1
4.1: 0.4.14-alt3
4.0: 0.4.14-alt3
www.altlinux.org/Changes

Группа :: Система/Настройка/Сеть
Пакет: iscsitarget

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: iscsitarget-0.4.15-alt.patch
Скачать


diff -urN iscsitarget-0.4.15.orig/etc/initd/initd.alt iscsitarget-0.4.15/etc/initd/initd.alt
--- iscsitarget-0.4.15.orig/etc/initd/initd.alt	1970-01-01 03:00:00 +0300
+++ iscsitarget-0.4.15/etc/initd/initd.alt	2007-06-09 01:05:38 +0300
@@ -0,0 +1,111 @@
+#!/bin/sh
+#
+# ietd - iSCSI Enterprise Target Daemon
+#
+# chkconfig: 345 39 35
+# description: Starts and stops the iSCSI target
+# processname: ietd
+# config:  /etc/ietd.conf
+# pidfile: /var/run/ietd.pid
+
+# Do not load RH compatibility interface.
+WITHOUT_RC_COMPAT=1
+
+# Source function library.
+. /etc/init.d/functions
+
+PIDFILE=/var/run/ietd.pid
+LOCKFILE=/var/lock/subsys/ietd
+RETVAL=0
+
+MEM_SIZE=1048576
+
+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
+}
+
+RETVAL=0
+
+start()
+{
+	configure_memsize
+	modprobe -q crc32c
+	modprobe iscsi_trgt
+	action $"Starting iSCSI target service: " start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- ietd
+	RETVAL=$?
+	return $RETVAL
+}
+	
+stop()
+{
+	ietadm --op delete >/dev/null 2>/dev/null
+	action $"Stopping iSCSI target service: " stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- ietd
+	modprobe -r iscsi_trgt 2>/dev/null
+	RETVAL=$?
+	modprobe -r crc32c 2>/dev/null
+	return $RETVAL
+}
+
+restart()
+{
+        stop
+        start
+}
+
+condrestart()
+{
+	if [ -e "$LOCKFILE" ]; then
+                    restart
+	fi
+}
+
+case "$1" in
+  start)
+        start
+        ;;
+  stop)
+        stop
+        ;;
+  restart)
+        restart
+        ;;
+  condrestart)
+        condrestart
+        ;;
+  status)
+        status --pidfile "$PIDFILE" --expect-user root -- ietd
+        RETVAL=$?
+        ;;
+  *)
+	msg_usage "${0##*/} {start|stop|restart|status}"
+        RETVAL=1
+esac
+
+exit 0
diff -urN iscsitarget-0.4.15.orig/Makefile iscsitarget-0.4.15/Makefile
--- iscsitarget-0.4.15.orig/Makefile	2007-03-22 16:10:56 +0200
+++ iscsitarget-0.4.15/Makefile	2007-06-09 00:46:19 +0300
@@ -169,6 +169,9 @@
 	@if [ -f /etc/debian_version ]; then \
 		install -vD -m 755 etc/initd/initd.debian \
 			$(DISTDIR)/etc/init.d/iscsi-target; \
+	elif [ -f /etc/altlinux-release ]; then \
+		install -vD -m 755 etc/initd/initd.alt \
+			$(DISTDIR)/etc/rc.d/init.d/iscsi-target; \
 	elif [ -f /etc/redhat-release ]; then \
 		install -vD -m 755 etc/initd/initd.redhat \
 			$(DISTDIR)/etc/init.d/iscsi-target; \
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin