tgt: allow to export devices in addition to files; define reload_service as stop+start
Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
This commit is contained in:
parent
09a5633817
commit
accb5447e8
2 changed files with 7 additions and 2 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
PKG_NAME:=tgt
|
PKG_NAME:=tgt
|
||||||
PKG_VERSION:=1.0.53
|
PKG_VERSION:=1.0.53
|
||||||
PKG_REV:=9764e0afd9a7115e356fc85569a780f9003c4eac
|
PKG_REV:=9764e0afd9a7115e356fc85569a780f9003c4eac
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
PKG_USE_MIPS16:=0
|
PKG_USE_MIPS16:=0
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
|
|
@ -14,7 +14,7 @@ logger="logger -p daemon.err -s -t $NAME"
|
||||||
|
|
||||||
validate_lun_section() {
|
validate_lun_section() {
|
||||||
uci_validate_section tgt lun $1 \
|
uci_validate_section tgt lun $1 \
|
||||||
'device:file' \
|
'device:or("file", "device")' \
|
||||||
'type:or("disk", "cd", "pt"):disk' \
|
'type:or("disk", "cd", "pt"):disk' \
|
||||||
'bstype:or("rdwr", "aio", "sg"):rdwr' \
|
'bstype:or("rdwr", "aio", "sg"):rdwr' \
|
||||||
'sync:bool:0' \
|
'sync:bool:0' \
|
||||||
|
@ -227,6 +227,11 @@ stop_service() {
|
||||||
$tgtadm --mode sys --op delete
|
$tgtadm --mode sys --op delete
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
stop_service
|
||||||
|
start_service
|
||||||
|
}
|
||||||
|
|
||||||
show() {
|
show() {
|
||||||
$tgtadm --mode target --op show
|
$tgtadm --mode target --op show
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue