Am 18.07.19 um 13:55 schrieb Michael Biebl:
> Am 11.07.19 um 17:41 schrieb Mert Dirik:
>> On 7/11/19, Thomas Bätzler <[email protected]> wrote:
>>>
>>> To wit:
>>>
>>>   root@kvm1:~# /etc/init.d/rsync
>>>   Usage: /etc/init.d/rsync {start|stop|reload|force-reload|restart|status}
>>>
>>> vs.
>>>
>>>   root@kvm1:~# /etc/init.d/mysql
>>>   /lib/lsb/init-functions.d/40-systemd: line 11: 1: unbound variable
>>>
>>>
>>
>> Thanks, I've been able to confirm that.
>>
>>> In this case, line 16 has to be changed to 'argument="${1:-}', too (last
>>> line of your patch), since the call without argument falls through to
>>> the else branch, i.e.
>>
>> Indeed. "argument=$1" line had need to be changed, not the
>> "argument=$2" one. Can you try this patch:
>>
>>          executable="$__init_d_script_name"
>>          argument="$1"
> 
> Is $1 guaranteed to be set/not an issue with __init_d_script_name?
> 
>>      elif [ "${0##*/}" = "init-d-script" ] ||
>> -         [ "${0##*/}" = "${1##*/}" ]; then # scripts run with old
>> init-d-script
>> +         [ "${0}" = "${1:-}" ]; then # scripts run with old  init-d-script
> 
> Why  do we need ${1:-1} here...
> 
>>          executable="$1"
>>          argument="$2"
> 
> ..but no checks here?

Nvm, I see now why [ "${0}" = "${1:-}" ] is necessary for the
fallthrough case.


I will apply Mert's patch, as is then.

Regards,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Pkg-systemd-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Reply via email to