[OE-core] [PATCH 4/6] openssh: add init.d/sshd status command for LSB compliance

ChenQi Qi.Chen at windriver.com
Thu Aug 22 07:15:07 UTC 2013


On 08/22/2013 03:02 PM, jhuang0 wrote:
>
>
> On 8/22/2013 2:42 PM, Khem Raj wrote:
>> Hi Jackie
>>
>> One thing comes to mind is that these scripts are hardcoding the 
>> binaries and may be it would be
>> nicer to replace the bindir, libdir and so on at install time, that 
>> would make them flexible where /usr
>> is not used e.g. but I guess thats a general problem with capture 
>> init scripts all around probably.
>
> Yes it is general problem that almost all init scripts have these 
> hardcoding binaries, maybe we need a requirement and do that for all 
> these scripts with a plan.
>
> Thanks,
> Jackie
>

Agree.

If we're going to do this, we need to take the postinst scripts into 
consideration, as the postinst scripts have the same problem.

Best Regards,
Chen Qi

>>
>> On Aug 19, 2013, at 8:25 PM, jackie.huang at windriver.com wrote:
>>
>>> From: Jackie Huang <jackie.huang at windriver.com>
>>>
>>> Signed-off-by: Li Wang <li.wang at windriver.com>
>>> Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
>>> ---
>>> .../openssh/openssh-6.2p2/init                     |   15 
>>> ++++++++++++++-
>>> 1 files changed, 14 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/init 
>>> b/meta/recipes-connectivity/openssh/openssh-6.2p2/init
>>> index 6beec84..6bbc573 100644
>>> --- a/meta/recipes-connectivity/openssh/openssh-6.2p2/init
>>> +++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/init
>>> @@ -1,6 +1,9 @@
>>> #! /bin/sh
>>> set -e
>>>
>>> +# source function library
>>> +. /etc/init.d/functions
>>> +
>>> # /etc/init.d/ssh: start and stop the OpenBSD "secure shell" daemon
>>>
>>> test -x /usr/sbin/sshd || exit 0
>>> @@ -46,6 +49,11 @@ check_keys() {
>>>     fi
>>> }
>>>
>>> +rh_status() {
>>> +    status /usr/sbin/sshd;
>>> +    return $?
>>> +}
>>> +
>>> export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
>>>
>>> case "$1" in
>>> @@ -84,8 +92,13 @@ case "$1" in
>>>     echo "."
>>>     ;;
>>>
>>> +  status)
>>> +    rh_status;
>>> +    exit $?
>>> +  ;;
>>> +
>>>    *)
>>> -    echo "Usage: /etc/init.d/ssh 
>>> {start|stop|reload|force-reload|restart}"
>>> +    echo "Usage: /etc/init.d/ssh 
>>> {start|stop|status|reload|force-reload|restart}"
>>>     exit 1
>>> esac
>>>
>>> -- 
>>> 1.7.4.1
>>>
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core at lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>>
>>
>




More information about the Openembedded-core mailing list