-
-
Save fukusaka/459680 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- tgt-admin.orig 2010-02-02 20:56:19.000000000 +0900 | |
+++ tgt-admin 2010-07-01 16:22:58.293046426 +0900 | |
@@ -1166,7 +1166,7 @@ | |
# Check if userspace uses this device | |
my $lsof_check = check_exe("lsof"); | |
if ($lsof_check ne 1) { | |
- system("lsof $backing_store &>/dev/null"); | |
+ system("lsof $backing_store >/dev/null 2>&1"); | |
my $exit_value = $? >> 8; | |
if ($exit_value eq 0) { | |
execute("# Device $backing_store is used (already tgtd target?)."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#TGTD_ENABLE=no | |
TGTD_ENABLE=yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tgtd - Linux SCSI target framework Daemon | |
# | |
# Linux SCSI target framework (tgt) aims to simplify various SCSI | |
# target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance. | |
description "scsi target framework daemon" | |
start on started rc-sysinit | |
stop on runlevel [!2345] | |
expect fork | |
respawn | |
pre-start script | |
. /etc/default/tgtd | |
[ "${TGTD_ENABLE}" = "yes" ] || { stop; exit 0; } | |
end script | |
post-start script | |
tgt-admin --offline ALL | |
tgt-admin --execute | |
tgt-admin --ready ALL | |
end script | |
pre-stop script | |
tgt-admin --delete ALL | |
end script | |
exec tgtd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment