[ovs-dev] [rhel --user 6/7] ovs-lib: add directory_check()
Andy Zhou
azhou at ovn.org
Wed Nov 25 00:00:00 UTC 2015
On Tue, Nov 24, 2015 at 3:34 PM, Ben Pfaff <blp at ovn.org> wrote:
> On Thu, Nov 19, 2015 at 12:58:41PM -0800, Andy Zhou wrote:
> > Rafactor common directory existence check and ownership check into
> > a common function. Move daemon's default directory to $RUNDIR, since
> > the process may not able to write core file to "/" anymore after the
> > user change.
> >
> > Signed-off-by: Andy Zhou <azhou at ovn.org>
>
> Do you have any idea about the portability of "stat -c"? I also have
> the same concerns here about "chown -R" as I did in a previous patch.
>
I will drop the group check as we discussed off line. Will use the same #1
method
suggested in the other pathc.
>
> Did you consider changing permissions in a post-install script, instead
> of in a per-startup script?
>
Yes, post-install script has those changes, but they are not sufficient in
all cases.
>
> Should the following check for $OVS_GROUP != root also?
>
Yes, Will fix in V2.
> > + # add --user for non root user
> > + if test "$OVS_USER" != "root"; then
> > + set "$@" --user="$OVS_USER":"$OVS_GROUP"
> > + fi
>
More information about the dev
mailing list