>>>> Ruediger Meier writes:
On Thursday 08 August 2013, Claudio Freire wrote:
> On Thu, Aug 8, 2013 at 3:34 PM, Andreas Jaeger <aj(a)suse.com> wrote:
> > On 08/08/2013 07:10 PM, Claudio Freire wrote:
> >> On Thu, Aug 8, 2013 at 1:57 PM, Andreas Jaeger <aj(a)suse.com> wrote:
> >>> Better: >>> source /etc/os-release >>> if [ $NAME =
"openSUSE" ] ;
> then... >>> fi
> >> Call me paranoid, but I wouldn't source files like that, that >>
> part of my own package. And even then...
> > So, you're not trusting the distribution? ;)
> > You can source it from a shell which is a great advantage but you > can
> do it differently if you prefer,
> Well, it's not that. One would have to have root to inject stuff there.
> The issue is that of coupling. Sourcing it as a script, means a tiny
> otherwise inconsequential formatting error there would break all the
> scripts that source it, and for what, when grep can do just fine?
Of course it's bad that it could crash. Moreover
you have to take care that
the file may contain variables which you are using already in your script.
On the other hand your grep line would parse the file
important, you should ignore comments,
BTW the man page is paradox
1. "It is possible to source the configuration from shell scripts."
2. "...no shell features are supported ... variable expansion is
__explicitly__ not supported"
So how would you source the file with disabled shell
paradox = systemd
Life is endless possibilities
To unsubscribe, e-mail: opensuse-packaging+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-packaging+owner(a)opensuse.org