Commit Graph

3111 Commits

Author SHA1 Message Date
William Hubbs
64354831da openrc: convert snprintf calls to xasprintf 2018-06-20 09:37:20 -05:00
William Hubbs
e14edd765f supervise-daemon: convert snprintf calls to xasprintf 2018-06-19 17:57:10 -05:00
William Hubbs
f9d41243d8 start-stop-daemon: convert snprintf calls to xasprintf 2018-06-19 17:46:12 -05:00
William Hubbs
be7ad06d4a rc-status: convert snprintf calls to xasprintf 2018-06-19 17:06:33 -05:00
William Hubbs
a616516895 rc-status: fix gcc 7 warnings 2018-06-19 16:18:48 -05:00
William Hubbs
04721ece03 start-stop-daemon: fix gcc 7 warnings 2018-06-19 15:32:10 -05:00
William Hubbs
c7e8f1133a checkpath: fix gcc 7 warnings 2018-06-19 14:01:54 -05:00
William Hubbs
47e4bfae57 fix gcc 7 warnings in pipe routines 2018-06-19 13:59:16 -05:00
William Hubbs
8a945194af libeinfo: clean up gcc 7 compiler warnings 2018-06-19 13:52:40 -05:00
William Hubbs
aa4a004c29 version 0.38 2018-06-17 12:45:51 -05:00
William Hubbs
9ec5d36bdd Update ChangeLog 2018-06-15 18:04:43 -05:00
William Hubbs
a097933eda sh/start-stop-daemon.sh: fix processing of the logger arguments 2018-06-15 17:44:39 -05:00
William Hubbs
a6f5b1bb63 Update ChangeLog 2018-06-15 12:59:13 -05:00
William Hubbs
e6d01471fe start-stop-daemon: add ability to log stdout or stderr to processes 2018-06-15 12:23:50 -05:00
William Hubbs
d4501a9f06 fix a typo 2018-06-14 14:55:42 -05:00
Mike Gilbert
ec8abea460 Add helper to spawn process with stdin connected to a pipe 2018-06-13 13:49:42 -05:00
William Hubbs
e4ddfa38e0 user-guide.md: small cleanups 2018-06-05 17:34:09 -05:00
William Hubbs
21d30bc6d9 service-script-guide.md: small cleanups 2018-06-05 17:26:57 -05:00
William Hubbs
2a1ff6e49c version 0.37 2018-06-05 16:11:28 -05:00
William Hubbs
6762cb875c Update ChangeLog 2018-05-31 16:53:25 -05:00
Austin English
6edf516a1f sh/supervise-daemon.sh: use start_stop_daemon_args if supervise_daemon_args is undefined 2018-05-30 12:11:10 -04:00
William Hubbs
7e56a49e23 Logger: only log printable characters and newlines
X-Gentoo-Bug: 651412
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651412
2018-05-22 17:11:43 -05:00
William Hubbs
fa5aea80c5 openrc-run.sh: move crashed test outside started test
This is handled inside librc, so we don't need the nesting in this
script.
2018-05-22 12:20:38 -05:00
William Hubbs
0f4fa41574 Add mark_service_crashed binary 2018-05-22 12:20:38 -05:00
William Hubbs
5d6dd97bba rc-misc: add the crashed state 2018-05-22 12:20:38 -05:00
William Hubbs
37e2944272 librc: Add check for crashed state
In rc_service_state,, call rc_service_daemons_crashed to check for
a crashed daemon if the service is started.
2018-05-22 12:19:41 -05:00
William Hubbs
4e0eace837 librc: Add crashed state 2018-05-22 12:19:22 -05:00
William Hubbs
faa8318b3b Remove the _rc_can_find_pids function
This test to find if we could see pid 1 was being used inconsistently in
rc-status and mark_service_crashed to decide whether we could test to
see if the daemon for the service was crashed, and it was not part of
the librc library.

I am removing it from the executables because of inconsistent usage. I
will add it to the library if it is needed there.
2018-05-18 16:48:21 -05:00
William Hubbs
08da36149c rc-service: add --ifstarted and --ifstopped options 2018-05-16 13:25:22 -05:00
William Hubbs
56870d0db1 Man: rc-service man page cleanups 2018-05-15 17:09:56 -05:00
William Hubbs
4d47ce440c rc-service: add -d/--debug and -D/--nodeps options 2018-05-15 16:59:21 -05:00
William Hubbs
958f57d895 openrc-run: respect the RC_NODEPS environment variable 2018-05-15 16:27:42 -05:00
William Hubbs
04886efd85 Add RC_DEBUG and RC_NODEPS to environment whitelist
These are needed so rc-service can pass debug and nodeps options to
openrc-run.
2018-05-15 16:18:19 -05:00
William Hubbs
d980798d64 openrc-run: respect the IN_DRYRUN environment variable
This allows rc-service to pass the tryrun option to openrc-run.

This is for #225.
2018-05-14 19:08:19 -05:00
William Hubbs
414a9aae6c rc-misc.c: Add IN_DRYRUN to environment whitelist
This allows rc-service to pass the dryrun option to openrc-run.

This is for #225.
2018-05-14 19:04:42 -05:00
William Hubbs
a7f475ca04 rc-service: add a --dry-run option
This is for #225.
2018-05-14 19:00:04 -05:00
William Hubbs
3c53680018 build: standardize installation modes
Gentoo was changing some of our installation modes from 0444 to 0644.
There isn't a reason to install things 0444, so we are switching these
to 0644 so the Gentoo ebuild doesn't need this extra step.
2018-05-11 15:38:27 -05:00
William Hubbs
f0ad647303 Revert "savecache: stop saving the dependency tree"
It is safe to save the deptree, but we also need to regenerate it at
boot time.
2018-05-11 11:54:48 -05:00
William Hubbs
b35e03b6b1 Revert "Logger: only log printable characters and newlines"
This reverts commit 2b1392af2f.
This seems to create issues shutting down, so I need to look into it
further.
2018-05-10 19:35:24 -05:00
William Hubbs
2b1392af2f Logger: only log printable characters and newlines
X-Gentoo-Bug: 651412
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651412
2018-05-09 17:30:08 -05:00
William Hubbs
a3d0e293ee Remove localmount from dependencies for linux-only services
This removes localmount from the dependencies of the consolefont,
keymaps, numlock and procfs services.

These services are Linux only and the default modern linux system has /
and /usr on the same file system.

This also fixes the following issue.

X-Gentoo-Bug: 651998
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651998
2018-05-07 18:12:55 -05:00
Andrey Utkin
0200002b8c start-stop-daemon: don't fail stopping if pidfile is gone
If pidfile does not exist when we are stopping the daemon, assume it is
already stopped, and report success.

hostapd is an example of a daemon which removes its pidfile when it is
exiting. If this daemon terminates prematurely, that is, without s-s-d
involvement, then openrc fails to restart it, because s-s-d "stop"
command fails when pidfile is missing.

X-Gentoo-Bug: 646274
X-Gentoo-Bug-URL: https://bugs.gentoo.org/646274
2018-05-02 13:42:59 -05:00
William Hubbs
f4e2142089 Add _POSIX_C_SOURCE definition to Linux build
We need this to allow builds on uclibc-ng based systems.

X-Gentoo-Bug: 650908
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=650908
2018-05-01 13:29:13 -05:00
William Hubbs
49a90f27a8 typo fix 2018-04-24 10:40:57 -05:00
Scall
2ae60ca041 rc-update: fix typo 2018-03-21 08:33:33 -04:00
William Hubbs
6b475ab269 init.d/modules: add code from modules-load service
There is no reason for these to be separate services. I did add a
provide so that we don't break backward compatibility.
2018-03-16 14:33:01 -05:00
William Hubbs
b302b0c094 net-online: always start after net
X-Gentoo-Bug: 650600
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=650600
2018-03-16 13:53:02 -05:00
William Hubbs
40aa69cf3a agetty.in: allow status to be displayed 2018-03-14 20:37:02 -05:00
William Hubbs
5346fbf2c9 supervise-daemon: fix off-by-one error 2018-03-14 20:05:45 -05:00
William Hubbs
92e6bdee12 Use _BSD_SOURCE on FreeBSD 2018-03-14 13:07:46 -05:00