networkctl: support edit --stdin

This commit is contained in:
Mike Yuan
2024-08-12 16:23:23 +02:00
parent 40f5c372c2
commit 119cba7835
7 changed files with 45 additions and 8 deletions
+1 -1
View File
@@ -323,7 +323,7 @@ int verb_edit(int argc, char *argv[], void *userdata) {
int r;
if (!on_tty() && !arg_stdin)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Cannot edit units if not on a tty.");
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Cannot edit units interactively if not on a tty.");
if (arg_transport != BUS_TRANSPORT_LOCAL)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Cannot edit units remotely.");
+1 -1
View File
@@ -347,7 +347,7 @@ static int systemctl_help(void) {
" --drop-in=NAME Edit unit files using the specified drop-in file name\n"
" --when=TIME Schedule halt/power-off/reboot/kexec action after\n"
" a certain timestamp\n"
" --stdin Read contents of edited file from stdin\n"
" --stdin Read new contents of edited file from stdin\n"
"\nSee the %2$s for details.\n",
program_invocation_short_name,
link,