From accb5447e8bed8dd3e9511475e8c51492995453d Mon Sep 17 00:00:00 2001 From: Maxim Storchak Date: Sun, 15 Feb 2015 19:39:37 +0200 Subject: [PATCH] tgt: allow to export devices in addition to files; define reload_service as stop+start Signed-off-by: Maxim Storchak --- net/tgt/Makefile | 2 +- net/tgt/files/etc/init.d/tgt | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/net/tgt/Makefile b/net/tgt/Makefile index 54f568f883..ef0a22f16b 100644 --- a/net/tgt/Makefile +++ b/net/tgt/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tgt PKG_VERSION:=1.0.53 PKG_REV:=9764e0afd9a7115e356fc85569a780f9003c4eac -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_USE_MIPS16:=0 PKG_SOURCE_PROTO:=git diff --git a/net/tgt/files/etc/init.d/tgt b/net/tgt/files/etc/init.d/tgt index da0320184e..c7ebbcc780 100755 --- a/net/tgt/files/etc/init.d/tgt +++ b/net/tgt/files/etc/init.d/tgt @@ -14,7 +14,7 @@ logger="logger -p daemon.err -s -t $NAME" validate_lun_section() { uci_validate_section tgt lun $1 \ - 'device:file' \ + 'device:or("file", "device")' \ 'type:or("disk", "cd", "pt"):disk' \ 'bstype:or("rdwr", "aio", "sg"):rdwr' \ 'sync:bool:0' \ @@ -227,6 +227,11 @@ stop_service() { $tgtadm --mode sys --op delete } +reload_service() { + stop_service + start_service +} + show() { $tgtadm --mode target --op show } -- 2.30.2