Browse Source

rename "regular" in `dinitctl add-dep` to "need"

iacore 2 months ago
parent
commit
0eb63f0fab
2 changed files with 4 additions and 4 deletions
  1. 3 3
      doc/manpages/dinitctl.8.m4
  2. 1 1
      src/dinitctl.cc

+ 3 - 3
doc/manpages/dinitctl.8.m4

@@ -277,14 +277,14 @@ If issued to the system instance of Dinit, this will also shut down the system.
 .TP
 \fBadd-dep\fR
 Add a dependency between two services.
-The \fIdependency-type\fR must be one of \fBregular\fR, \fBmilestone\fR or \fBwaits-for\fR.
-Note that adding a regular dependency requires that the service states are consistent with the
+The \fIdependency-type\fR must be one of \fBneed\fR, \fBmilestone\fR or \fBwaits-for\fR.
+Note that adding a \fBneed\fR dependency requires that the service states are consistent with the
 dependency (i.e. if the "from" service is started, the "to" service must also be started).
 Circular dependency chains may not be created.
 .TP
 \fBrm-dep\fR
 Remove a dependency between two services.
-The \fIdependency-type\fR must be one of \fBregular\fR, \fBmilestone\fR or \fBwaits-for\fR.
+The \fIdependency-type\fR must be one of \fBneed\fR, \fBmilestone\fR or \fBwaits-for\fR.
 If the "to" service is not otherwise active it may be stopped as a result of removing the dependency.
 .TP
 \fBenable\fR

+ 1 - 1
src/dinitctl.cc

@@ -295,7 +295,7 @@ int dinitctl_main(int argc, char **argv)
             // service name / other non-option
             if (command == ctl_cmd::ADD_DEPENDENCY || command == ctl_cmd::RM_DEPENDENCY) {
                 if (! dep_type_set) {
-                    if (strcmp(argv[i], "regular") == 0) {
+                    if (strcmp(argv[i], "need") == 0 || strcmp(argv[i], "regular") == 0) {
                         dep_type = dependency_type::REGULAR;
                     }
                     else if (strcmp(argv[i], "milestone") == 0) {