Re: [RFC] example init.d script for tgtd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 21, 2008 at 8:57 PM, Tomasz Chmielewski <mangoo@xxxxxxxx> wrote:
> Mike Christie schrieb:
>>
>> Tomasz Chmielewski wrote:
>>>
>>> FUJITA Tomonori schrieb:
>>>>
>>>> On Mon, 20 Oct 2008 14:37:40 +0200
>>>> Tomasz Chmielewski <mangoo@xxxxxxxx> wrote:
>>>>
>>>>> Currently, there is no standard way to start and configure tgtd via a
>>>>> init.d script.
>>>>> As a result, even if any distribution packages tgt, it doesn't contain
>>>>> any startup script.
>>>>>
>>>>> So let's help the packagers!
>>>>
>>>> Really? I thought that Mike has an init script for RHEL.
>>>
>>> I don't know the RHEL script you mention (I found no references in the
>>> archive), is it this one (scroll down a bit on that page)?
>>>
>>
>> We just added it. It is not my work. It is from Ronnie. I attached the
>> file in the mail. It might be a older version than is in RHEL. I cannot log
>> into our servers because my vpn is down. I think the /var/lock file and
>> /etc/sysconfig/tgtd might be too Red Hat'ish (I do not think other distros
>> use sysconfig).
>
> Mike,
>
> the RHEL script will probably fail to start here (may depend on machine,
> load etc.):
>
>        daemon tgtd $TGTD_OPTIONS
>
>        # read the config        tgt-admin -e -c "${TGTD_CONFIG}"
>
>
> tgtd starts in the background immediately, but does not yet accept commands
> from tgtadm. So adding "sleep 1" between starting tgtd and tgt-admin should
> help.
>

Having to explicitely add a sleep in scripts is a bit dodgy.

Maybe better to enhance tgtadm to try-and-retry for x seconds before
giving up and thus hiding this
ugly race from the average user?
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux