aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDavid Oberhollenzer <goliath@infraroot.at>2019-03-18 19:26:42 +0100
committerDavid Oberhollenzer <goliath@infraroot.at>2019-03-18 19:49:42 +0100
commit065d3b678d58e9e758d19e015b1e25a79a8aaec6 (patch)
treef209cd3cf2f617184c316e02569fb4ec40d0c71b /cmd
parent11053ebe6abe6a662944329be2cc7ae79f671951 (diff)
cleanup: remove broken stat ... open pattern
confused deputy is confused. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/service/dumpscript.c15
-rw-r--r--cmd/service/service.85
2 files changed, 4 insertions, 16 deletions
diff --git a/cmd/service/dumpscript.c b/cmd/service/dumpscript.c
index 1822aa9..7102b5c 100644
--- a/cmd/service/dumpscript.c
+++ b/cmd/service/dumpscript.c
@@ -10,9 +10,8 @@
static service_t *try_load(const char *directory, const char *filename)
{
- int dirfd, type;
- struct stat sb;
service_t *svc;
+ int dirfd;
dirfd = open(directory, O_RDONLY | O_DIRECTORY);
@@ -21,18 +20,6 @@ static service_t *try_load(const char *directory, const char *filename)
return NULL;
}
- if (fstatat(dirfd, filename, &sb, AT_SYMLINK_NOFOLLOW)) {
- fprintf(stderr, "stat %s/%s: %s\n",
- directory, filename, strerror(errno));
- close(dirfd);
- return NULL;
- }
-
- type = (sb.st_mode & S_IFMT);
-
- if (type != S_IFREG && type != S_IFLNK)
- return NULL;
-
svc = rdsvc(dirfd, filename, 0);
close(dirfd);
return svc;
diff --git a/cmd/service/service.8 b/cmd/service/service.8
index c69aac5..1f021db 100644
--- a/cmd/service/service.8
+++ b/cmd/service/service.8
@@ -39,9 +39,10 @@ the desired service instance.
Parse a service file from and produce a pseudo shell script containing the
exact commands executed when starting the service.
.TP
-.BR status
+.BR status " " \fI[--detail|-d]\fP " " \fI[services...]\fP
Print a status report of all supervised services, i.e. if they are currently
-running, have exited or waiting to be scheduled.
+running, have exited or waiting to be scheduled. A specific list of services
+can be specified. Shell globbing patterns can be used.
.SH AVAILABILITY
This program is part of the Pygos init system.
.SH COPYRIGHT