-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create sm-plugins and operations/c8y directories by tedge init #2469
Create sm-plugins and operations/c8y directories by tedge init #2469
Conversation
Robot Results
|
@@ -127,6 +127,14 @@ impl TEdgeInitCmd { | |||
Some(0o775), | |||
), | |||
)?; | |||
create_directory( | |||
config_dir.join("operations").join("c8y"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may have to undo this in future as the desire is to make tedge
and other mappers as independent as possible. The right thing to do would have been to make the tedge-mapper-c8y
create this directory as part of its installation as well, in addition to runtime, so that plugins like c8y-remote-access
plugin, can be sure that this directory is present, before it adds its own operation file. For that to work, such plugins should have a Dependends
relationship defined on the tedge-mapper-c8y
package, but that's not an unreasonable requirement.
But, for the current state of things, this quick fix is seems sufficient.
4d1a549
to
6826dd4
Compare
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
6826dd4
to
92c2ddf
Compare
Proposed changes
This PR changes
tedge init
to create:<config_dir>/sm-plugins
directory withroot:root
and755
<config_dir>/operations/c8y
directory withtedge:tedge
and755
The directory
sm-plugins
gets created by thetedge-apt-plugin
package installation, therefore, keeping the same permission as it is now.The directory
operations
is already created bytedge init
, however,operations/c8y
gets created on the start-up oftedge-mapper-c8y
. From the description of #2452, the user may create the directory before they runtedge-mapper-c8y
, so this PR changes it to create bytedge init
.Current permission
Types of changes
Paste Link to the issue
#2444 and #2452
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments