tgt: allow to export devices in addition to files; define reload_service as stop... 913/head
authorMaxim Storchak <m.storchak@gmail.com>
Sun, 15 Feb 2015 17:39:37 +0000 (19:39 +0200)
committerMaxim Storchak <m.storchak@gmail.com>
Mon, 16 Feb 2015 08:58:53 +0000 (10:58 +0200)
Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
net/tgt/Makefile
net/tgt/files/etc/init.d/tgt

index 54f568f883d786f44791e2adbe7005889061f7b0..ef0a22f16b313f6f49e386d722c1dc4ed7de96e2 100644 (file)
@@ -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
index da0320184e598be9f25b8b881b4449bc7996b176..c7ebbcc78034511f8290b3513f935ffb1b340cc1 100755 (executable)
@@ -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
 }