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

Re: im-config | Use im-config on Wayland without uninstalling IBus (!5)



2020년 7월 14일 (화) 오후 2:11, Gunnar Hjalmarsson <gunnarhj@ubuntu.com>님이 작성:
>
> On 2020-07-14 06:34, Osamu Aoki wrote:
> > Gunnar:
> > As for devel branch, I think we need to make coding style adjustment
> > and refactoring with future security improvement in mind for
> > /etc/default/im-config.  Let's leave it for future discussion.
> > (writing shell code in /etc file isn't the best style.  It should be
> > simple assignment lines which can be parsed by grep/sed pipe.)
>
> Sure, I'm open for improving that. It works, though, since the file is
> sourced and not parsed. Ubuntu has had a patch with similar code for
> many cycles.

/etc/default/FILE files are configs. There are reasons why they have
only key/value pairs and comments. Code in them is error-prone because
configs are meant to be modified by users. And programs should work
reasonably even when their /etc/default files are removed. There are
some notes about it in the policy:
https://www.debian.org/doc/debian-policy/ch-opersys.html#writing-the-scripts
 (though it's about init scripts)

If you need conditional defaults depending on desktops and distros,
consider making multiple keys and do the conditional check in program
code.


Reply to: