systemctl: add "edit --stdin"
This is a fancy wrapper around "cat <<EOF", but: - the user doesn't need to figure out the file name, - parent directories are created automatically, - daemon-reload is implied, so it's a convenient way to create units or drop-ins. Closes https://github.com/systemd/systemd/issues/21862.
This commit is contained in:
@@ -24,7 +24,8 @@ struct EditFileContext {
|
||||
const char *marker_start;
|
||||
const char *marker_end;
|
||||
bool remove_parent;
|
||||
bool overwrite_with_origin; /* whether to always overwrite target with original file */
|
||||
bool overwrite_with_origin; /* Always overwrite target with original file. */
|
||||
bool stdin; /* Read contents from stdin instead of launching an editor. */
|
||||
};
|
||||
|
||||
void edit_file_context_done(EditFileContext *context);
|
||||
|
||||
Reference in New Issue
Block a user