Compare commits
	
		
			20 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 9d201d55bc | ||
|   | d3f4199005 | ||
|   | dc071dfacd | ||
|   | 42cd8115b9 | ||
|   | d46beb28c4 | ||
|   | f1c98888d8 | ||
|   | c2a90b8326 | ||
|   | 53f5b6d894 | ||
|   | 0a50cc494a | ||
|   | f2a9891d7f | ||
|   | 5df7ee0564 | ||
|   | b731c02a38 | ||
|   | c42916ea19 | ||
|   | f973354ccd | ||
|   | 69349f7b57 | ||
|   | 1b1a70ecca | ||
|   | 05cfbb8348 | ||
|   | a70b65f851 | ||
|   | 0660d2455d | ||
|   | 01c5b98d38 | 
							
								
								
									
										704
									
								
								ChangeLog
									
									
									
									
									
								
							
							
						
						
									
										704
									
								
								ChangeLog
									
									
									
									
									
								
							| @@ -1,291 +1,64 @@ | ||||
| commit 6edf516a1fe0ad4f4e8738f9fdd1bf0bc7718361 | ||||
| Author: Austin English <austinenglish@gmail.com> | ||||
| Commit: Doug Freed <dwfreed@mtu.edu> | ||||
|  | ||||
|     sh/supervise-daemon.sh: use start_stop_daemon_args if supervise_daemon_args is undefined | ||||
|  | ||||
| commit 7e56a49e23c810673b83e48eb9ca36229bb4016e | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Logger: only log printable characters and newlines | ||||
|      | ||||
|     X-Gentoo-Bug: 651412 | ||||
|     X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651412 | ||||
|  | ||||
| commit fa5aea80c50fb724d2c98a6542307adbafd0e62d | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     openrc-run.sh: move crashed test outside started test | ||||
|      | ||||
|     This is handled inside librc, so we don't need the nesting in this | ||||
|     script. | ||||
|  | ||||
| commit 0f4fa41574a4ebf8117493e5411f8ab522010467 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Add mark_service_crashed binary | ||||
|  | ||||
| commit 5d6dd97bba3559b57fb1c1de35e644c6dbd6baa7 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     rc-misc: add the crashed state | ||||
|  | ||||
| commit 37e29442721af0dc3846e87ef2b85a474af3cf2b | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     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. | ||||
|  | ||||
| commit 4e0eace837287845504c9895429dc9f64872d075 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     librc: Add crashed state | ||||
|  | ||||
| commit faa8318b3ba278544413a39d4a5ae4457711793f | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     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. | ||||
|  | ||||
| commit 08da36149c0b41c64a09369c3eef5e2f5a6fa39c | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     rc-service: add --ifstarted and --ifstopped options | ||||
|  | ||||
| commit 56870d0db18209396f8276bdc05d413fe4dd7a88 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Man: rc-service man page cleanups | ||||
|  | ||||
| commit 4d47ce440c3e8f193cff82a77e6691ee6e7fac33 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     rc-service: add -d/--debug and -D/--nodeps options | ||||
|  | ||||
| commit 958f57d895b6573b39e62097e5e9881f16174715 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     openrc-run: respect the RC_NODEPS environment variable | ||||
|  | ||||
| commit 04886efd85328988657c34440da9ba6aa2841cfd | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Add RC_DEBUG and RC_NODEPS to environment whitelist | ||||
|      | ||||
|     These are needed so rc-service can pass debug and nodeps options to | ||||
|     openrc-run. | ||||
|  | ||||
| commit d980798d6444bbfc508796a233e962bf4dd61275 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     openrc-run: respect the IN_DRYRUN environment variable | ||||
|      | ||||
|     This allows rc-service to pass the tryrun option to openrc-run. | ||||
|      | ||||
|     This is for #225. | ||||
|  | ||||
| commit 414a9aae6ce066d2a6ad42e7e24d1c12a7b46409 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     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. | ||||
|  | ||||
| commit a7f475ca04856ef8232364c5b0c3191566b0696c | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     rc-service: add a --dry-run option | ||||
|      | ||||
|     This is for #225. | ||||
|  | ||||
| commit 3c53680018c1799d0d804e241a9fa4d3b9423896 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     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. | ||||
|  | ||||
| commit f0ad647303daca528cb9b75f9a07d422318635c2 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Revert "savecache: stop saving the dependency tree" | ||||
|      | ||||
|     It is safe to save the deptree, but we also need to regenerate it at | ||||
|     boot time. | ||||
|  | ||||
| commit b35e03b6b1acc841ac33f601dd39c1152523621e | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Revert "Logger: only log printable characters and newlines" | ||||
|      | ||||
|     This reverts commit 2b1392af2fe9e5dfc8eda2f19d896efdc41840bf. | ||||
|     This seems to create issues shutting down, so I need to look into it | ||||
|     further. | ||||
|  | ||||
| commit 2b1392af2fe9e5dfc8eda2f19d896efdc41840bf | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Logger: only log printable characters and newlines | ||||
|      | ||||
|     X-Gentoo-Bug: 651412 | ||||
|     X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651412 | ||||
|  | ||||
| commit a3d0e293eebcb92564c473e61ca42724844fb279 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     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 | ||||
|  | ||||
| commit 0200002b8cbd061ac79b6aed4024220cd0386d2c | ||||
| Author: Andrey Utkin <andrey_utkin@gentoo.org> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     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 | ||||
|  | ||||
| commit f4e2142089487b7f5c99da949d7bf8d038724df7 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     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 | ||||
|  | ||||
| commit 49a90f27a848ba02a363fc0c844d6284728bdd73 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     typo fix | ||||
|  | ||||
| commit 2ae60ca0419d60c86904a8e15e71e902549e18d4 | ||||
| Author: Scall <Scall@users.noreply.github.com> | ||||
| Commit: Doug Freed <dwfreed@mtu.edu> | ||||
|  | ||||
|     rc-update: fix typo | ||||
|  | ||||
| commit 6b475ab26992f1dd8815700828df46abc4b71d27 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     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. | ||||
|  | ||||
| commit b302b0c094c2c99b810aec9c8877adcd1effabac | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     net-online: always start after net | ||||
|      | ||||
|     X-Gentoo-Bug: 650600 | ||||
|     X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=650600 | ||||
|  | ||||
| commit 40aa69cf3a99fa080375a702631da4d2311ebf3e | ||||
| commit d3f419900504b37aeda79b1bca68ac150d81efd6 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     agetty.in: allow status to be displayed | ||||
|  | ||||
| commit 5346fbf2c90b33b3abc01588e4727d4402f8db62 | ||||
| commit dc071dfacd23686dd3ae7168c60193618e36f0fa | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     supervise-daemon: fix off-by-one error | ||||
|  | ||||
| commit 92e6bdee12fa9d87a2535446ceccee261305e87c | ||||
| commit 42cd8115b94525cad2f70a14cc14862e88c779be | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     version 0.35.5 | ||||
|  | ||||
| commit d46beb28c4fec99253542442ecacf59499e3159f | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Update ChangeLog | ||||
|  | ||||
| commit f1c98888d8429a484b4f37930998e82ef18e8657 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Use _BSD_SOURCE on FreeBSD | ||||
|  | ||||
| commit 71f275b2aa04d9a9323a49d1421796c4d50b1436 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     typo fix | ||||
|  | ||||
| commit 6dc0d0af333592203fabd4746279bb15d2801c0b | ||||
| commit c2a90b832685f9abdf710ab740181a8b935f862a | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Remove _XOPEN_SOURCE macros from builds | ||||
|  | ||||
| commit 59a9e53378891be7b12ed304ccb609e27da70751 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Add _POSIX_C_SOURCE macro to FreeBSD build | ||||
|  | ||||
| commit 122768d339175c925a1a228792f4725b7c802f46 | ||||
| commit 53f5b6d894723d034ba520853a9e5484488a2294 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     man: document default retry specification for supervise-daemon | ||||
|  | ||||
| commit fa3c60c0d8fd2267be5c1b156530b136a2503088 | ||||
| commit 0a50cc494a6e743712102c705e404faffcbcb110 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     man: document default retry sppecification for start-stop-daemon | ||||
|  | ||||
| commit 61905bfcf560219939c902dbb8fe9bc5088a42cf | ||||
| commit f2a9891d7f7f01cb9d9e9cffa36cdfc8116f8295 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     version 0.35.4 | ||||
|  | ||||
| commit 5df7ee056458f849626b7a2c30ad0e27e62d8d33 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Update ChangeLog | ||||
|  | ||||
| commit b731c02a389303dfba30a4b6c44efd0c2540bf66 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
| @@ -294,16 +67,34 @@ Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|     Remove the IFS manipulation and simplify the loop that processes the | ||||
|     settings. | ||||
|  | ||||
| commit 3e68013631765e00eddf118bc24e38254e7f6d64 | ||||
| commit c42916ea199c0eab35c6c0a72d9a9f2a326144b0 | ||||
| Author: Scall <Scall@users.noreply.github.com> | ||||
| Commit: Doug Freed <dwfreed@mtu.edu> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     init.d: swap should always be started after root | ||||
|      | ||||
|     Otherwise if a swap file is being used, and swap is started before | ||||
|     root, swapon may fail because of a read-only filesystem. | ||||
|  | ||||
| commit b46123f2e19a5eb8dc02b898e8c20a2ccc211615 | ||||
| commit f973354ccdcf4d94b19f08c68a14b2a004668c72 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     version 0.35.3 | ||||
|  | ||||
| commit 69349f7b57116572b95874c754b2ef87c552cf0d | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Update ChangeLog | ||||
|  | ||||
| commit 1b1a70ecca43034cb0770e18e287ccbca9f1eb52 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     version 0.35.2 | ||||
|  | ||||
| commit 05cfbb8348cf92bcc2edd922af1dc0a4c4c2e1f4 | ||||
| Author: Chris Cromer <cromerc@users.noreply.github.com> | ||||
| Commit: Doug Freed <dwfreed@mtu.edu> | ||||
|  | ||||
| @@ -311,17 +102,23 @@ Commit: Doug Freed <dwfreed@mtu.edu> | ||||
|      | ||||
|     Fixes #212 | ||||
|  | ||||
| commit 109869641f7b58d07819f6b65d7b085abf75083b | ||||
| commit a70b65f851c4f79e4fd43440d500d23cbf4b4a89 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Update ChangeLog | ||||
|  | ||||
| commit 0660d2455d461d648cf45076cf63b1c03e8e24c0 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     fix build on FreeBSD | ||||
|  | ||||
| commit e8a2305de0320dc98bf187bb97f936e2dc4a4554 | ||||
| commit 01c5b98d3842c8142891d4b88f21823f4042f594 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     version 0.36 | ||||
|     version 0.35.1 | ||||
|  | ||||
| commit f62975a1f8c4d5d4abdf78d8cad5509216138f03 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| @@ -1726,3 +1523,382 @@ Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     openrc-init: add optional sysvinit compatibility | ||||
|  | ||||
| commit 44bac3c3798f7eb9186c3ea8774552aa191bfae7 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Change killprocs to use kill_all instead of killall5 | ||||
|      | ||||
|     X-Gentoo-Bug:376977 | ||||
|     X-Gentoo-Bug-URL:https://bugs.gentoo.org/show_bug.cgi?id=376977 | ||||
|  | ||||
| commit 0ddee9b7d2b8dea810e252ca6a95c457876df120 | ||||
| Author: Sergei Trofimovich <slyfox@gentoo.org> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     openrc-init: fix buffer overflow in init.ctl | ||||
|      | ||||
|     How to reproduce 1-byte overflow: | ||||
|      | ||||
|     ``` | ||||
|     $ FEATURES=-test CFLAGS="-fsanitize=address -O0 -ggdb3" emerge -1 openrc | ||||
|      | ||||
|     ================================================================= | ||||
|     ==1==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff0efd8710 | ||||
|         at pc 0x000000402076 bp 0x7fff0efd7d50 sp 0x7fff0efd7d40 | ||||
|     WRITE of size 1 at 0x7fff0efd8710 thread T0 | ||||
|         #0 0x402075  (/sbin/openrc-init+0x402075) | ||||
|         #1 0x3cf6e2070f in __libc_start_main (/lib64/libc.so.6+0x3cf6e2070f) | ||||
|         #2 0x4013b8  (/sbin/openrc-init+0x4013b8) | ||||
|      | ||||
|     Address 0x7fff0efd8710 is located in stack of thread T0 at offset 2432 in frame | ||||
|         #0 0x401cfb  (/sbin/openrc-init+0x401cfb) | ||||
|      | ||||
|       This frame has 3 object(s): | ||||
|         [32, 160) 'signals' | ||||
|         [192, 344) 'sa' | ||||
|         [384, 2432) 'buf' <== Memory access at offset 2432 overflows this variable | ||||
|     HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext | ||||
|           (longjmp and C++ exceptions *are* supported) | ||||
|     SUMMARY: AddressSanitizer: stack-buffer-overflow ??:0 ?? | ||||
|     ``` | ||||
|      | ||||
|     The problem here is in the code handling reads from 'init.ctl': | ||||
|      | ||||
|     ``` | ||||
|     int main(int argc, char **argv) { | ||||
|     ... | ||||
|         char buf[2048]; | ||||
|         for (;;) { | ||||
|             /* This will block until a command is sent down the pipe... */ | ||||
|             fifo = fopen(RC_INIT_FIFO, "r"); | ||||
|             count = fread(buf, 1, 2048, fifo); | ||||
|             buf[count] = 0; | ||||
|             ... | ||||
|         } | ||||
|     ``` | ||||
|      | ||||
|     `buf[count] = 0;` writes outside the buffer when `fread()` returns non-truncated read. | ||||
|      | ||||
|     This fixes #138. | ||||
|  | ||||
| commit 688566c535111a141f77caf88db12a4338544f7b | ||||
| Author: Sergei Trofimovich <slyfox@inbox.ru> | ||||
| Commit: Doug Freed <dwfreed@mtu.edu> | ||||
|  | ||||
|     mk/cc.mk: make implicit function declarations fatal (#136) | ||||
|      | ||||
|     Avoids issues with missing prototypes causing truncation of pointers. | ||||
|      | ||||
|     Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> | ||||
|  | ||||
| commit 7185e242ffaa8cd1b672fe4726502a196fd779c2 | ||||
| Author: Sergei Trofimovich <slyfox@inbox.ru> | ||||
| Commit: Doug Freed <dwfreed@mtu.edu> | ||||
|  | ||||
|     rc-logger.c: fix crash on fclose(NULL) (#137) | ||||
|      | ||||
|     Only close the log if we successfully opened it. | ||||
|      | ||||
|     Reported-by: Brian Evans <grknight@gentoo.org> | ||||
|     Tested-by: Brian Evans <grknight@gentoo.org> | ||||
|     Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> | ||||
|  | ||||
| commit ec27299f4b88daa80261298fafea76ae634744d9 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     typo fix | ||||
|      | ||||
|     X-Gentoo-Bug: 618888 | ||||
|     X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=618888 | ||||
|  | ||||
| commit 1ece16bfcd0ab71d2f9fe17a75ee6184e0fa4828 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     openrc-shutdown: add dry-run option | ||||
|  | ||||
| commit 0cfd0dd9ef580ed9dc563ccc164d70efe8f299db | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     openrc-shutdown: move to single user mode by default | ||||
|      | ||||
|     To be more compatible with sysvinit, move to single user mode if no | ||||
|     options are specified on the command line. | ||||
|  | ||||
| commit a77ee2e94191ba1a286b8a6835f76556481566ba | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     init: add ability to switch to single user mode | ||||
|  | ||||
| commit 49b8a573a195f4b2cee992cd10678694da0a6f4f | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     add kill_all helper | ||||
|      | ||||
|     This is similar to the sysvinit killall5 utility.  It should only be used | ||||
|     in service scripts, so it will not be installed in the path. | ||||
|      | ||||
|     This closes #129. | ||||
|  | ||||
| commit a2055af90054f5125cc07d4851b1dc9d16815e7c | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     rc_status: calculate time differences in time_t and display seconds in uptime | ||||
|  | ||||
| commit cbf96967f1b6dc72ae16203dfbbb844bd08e8b6b | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     supervise-daemon: save start time and respawn count before dropping privs | ||||
|  | ||||
| commit f1013037b47cdd6344f1b3ed92b7f84d7fcca01f | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     version 0.27 | ||||
|  | ||||
| commit e4bfb4530a86a4ccdff312c857df37fa0da36fd6 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     update ChangeLog | ||||
|  | ||||
| commit 78e0042eccaf5a5554b195ad391b3ab0b8974cf6 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     man/rc-status: document changes for supervised daemons | ||||
|      | ||||
|     rc-status now shows the amount of time a supervised daemon has been | ||||
|     active as well as the number of times it has been respawned during the | ||||
|     current respawn period. | ||||
|  | ||||
| commit 82e12e309247bc84abf29aca04b3a2dd845fa11b | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     rc-status: show uptimes and respawn counts for supervised daemons | ||||
|  | ||||
| commit 1ebef0d7a38ec0a9635418b75c3aabb564c1577e | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     fix to_time_t to honor dst | ||||
|  | ||||
| commit 6b4050ab9cf9d678a1d6b7af7af7494f8533dbca | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     fix from_time_t function | ||||
|  | ||||
| commit cf5e9aa2bbcdf1783fadeab26586c1134929d928 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Move time_t conversions to rc-misc.c so they can be shared | ||||
|  | ||||
| commit a3250e77d412f2290e381b9e7569930d95e4fc5b | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     supervise-daemon: save start time and respawn count | ||||
|      | ||||
|     This will allow rc-status to display an uptime and restart count for | ||||
|     supervised processes. | ||||
|  | ||||
| commit df027ca4722c8755b23a65db75728b835ccca807 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     supervise-daemon: fix our status when we give up on the child process | ||||
|  | ||||
| commit 4c89e3f5fa1c65ccd0c843f98e4013c2085f243f | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     supervise-daemon:create multiple options from --respawn-limit | ||||
|      | ||||
|     This creates --respawn-delay, --respawn-max and --respawn-period. It was | ||||
|     suggested that it would be easier to follow if the options were | ||||
|     separated. | ||||
|      | ||||
|     This is for #126. | ||||
|  | ||||
| commit 3673040722b75c0a4d06fbeb272f917c7d1ea7c4 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     supervise-daemon: add a --respawn-limit option | ||||
|      | ||||
|     Allow limiting the number of times supervise-daemon will attempt to respawn a | ||||
|     daemon once it has died to prevent infinite respawning. Also, set a | ||||
|     reasonable default limit (10 times in a 5 second period). | ||||
|      | ||||
|     This is for issue #126. | ||||
|  | ||||
| commit 96c8ba2fb5f91a711ef5bfcfd8affe0b74ad18fe | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     supervise-daemon: mark all open file descriptors FD_CLOEXEC | ||||
|  | ||||
| commit 47cf1d0c707dc88d216bebc15be3f39d5eb47fa9 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     supervise-daemon:remove the controlling tty in the supervisor | ||||
|  | ||||
| commit 06a6a27e441372164872c7712b80728527a6ec05 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     supervise-daemon:  fix access to tty_fd and devnull_fd | ||||
|      | ||||
|     Both the child and supervisor need access to these file descriptors. | ||||
|  | ||||
| commit 5de3798afc55ce147e65926f863ec9c9cef60e79 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     supervise-daemon: mark the service started when the supervisor is active | ||||
|  | ||||
| commit 6ac094a59cf7b51d8527af15b07feca707a635c8 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     version 0.26 | ||||
|  | ||||
| commit 84c81ca02d7077a619dc704ff654385846fcd2b4 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     update ChangeLog | ||||
|  | ||||
| commit 0e3f8720984d7d5752a78a4135cd268e4f83b3d7 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     init: send term/kill signals as final step of shutdown | ||||
|  | ||||
| commit 5fd3747b190887d094225547f23007d25e2d9592 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     reword the bugs section of the openrc-init man page | ||||
|  | ||||
| commit 4694900190a9078397bb9083328b68b489af92f4 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     init: fix signal handling | ||||
|      | ||||
|     The only signals we handle are SIGINT and SIGCHLD, so block all others | ||||
|     and unblock them in the child process before we start a rurnlevel. | ||||
|  | ||||
| commit 05738bfce120114037d4f02c67ec740813f94b89 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     init: add re-exec capability | ||||
|      | ||||
|     This will allow the re-execution of the init process after upgrading | ||||
|     OpenRC. | ||||
|  | ||||
| commit 6f88ee4ec6f59e545346a7422facc3e5b6adac04 | ||||
| Author: i.Dark_Templar <darktemplar@dark-templar-archives.net> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     bootmisc: do not remove ld-elf32.so.hints | ||||
|      | ||||
|     File /var/run/ld-elf32.so.hints is used on FreeBSD 64bit multilib | ||||
|     This fixes #125. | ||||
|  | ||||
| commit cc51bdca3bac963878141da047e92f125772e14f | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     Add attribution to openrc-init.c and openrc-shutdown.c | ||||
|  | ||||
| commit 13ca79856e5836117e469c3edbcfd4bf47b6bab0 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     add init process | ||||
|      | ||||
|     openrc-init.c and openrc-shutdown.c are based on code which was written by | ||||
|     James Hammons <jlhamm@acm.org>, so I would like to publically | ||||
|     thank him for his work. | ||||
|  | ||||
| commit 79a9edc73068244ad843f2edbe4206ce696c91c8 | ||||
| Author: i.Dark_Templar <darktemplar@dark-templar-archives.net> | ||||
| Commit: i.Dark_Templar <darktemplar@dark-templar-archives.net> | ||||
|  | ||||
|     Fix make install on FreeBSD: don't try to install /etc/init.d/modules twice | ||||
|  | ||||
| commit 9eb669591e16c5ee0ca07babe058d0b7b2396077 | ||||
| Author: Austin English <austinenglish@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     start-stop-daemon: warn if calling --start with --retry or --stop with --wait | ||||
|      | ||||
|     This fixes #122 | ||||
|  | ||||
| commit 55a87a30ec845eb725e8a923c8f8eb7aa75baa72 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     init.d/agetty.in: add -prefix keyword | ||||
|  | ||||
| commit a912029462ae988ab4e2a96a0958e54a3c2e822f | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     init.d/mount-ro: change dependency on killprocs and savecache to after | ||||
|      | ||||
|     killprocs always succeeds and savecache is not required by mount-ro, so | ||||
|     we can just start after both of these have run. | ||||
|  | ||||
| commit 1e9078279709df2a3617bf1460890ceb1ddfcf59 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     agetty-guide: typo fix | ||||
|  | ||||
| commit 51a292e09b9362f13d5747d4eedaa521ddf9ce72 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     init.d: add agetty to ignore patterns | ||||
|  | ||||
| commit 50fccf47d4bd2ed6e7ea6ff7f72577c8e7b95d0d | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     sh/gendepends.sh.in: fix detection of service scripts | ||||
|      | ||||
|     We do not need to care about the path on the shebang line of a service | ||||
|     script as long as the shebang line ends with "openrc-run". | ||||
|     This fixes #119 and #120. | ||||
|  | ||||
| commit 9bd63b5d4a16601712a65eb8962214cdd4d26ce5 | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     update dependencies for clock service | ||||
|      | ||||
|     The clock services had a very long list of "before" dependencies that | ||||
|     referred to other services within OpenRC. For ease of maintenance, | ||||
|     convert these to "after clock" dependencies in the individual services. | ||||
|  | ||||
| commit 48db17a93f5e60c0d241f8fb06bfbdd01206fb9c | ||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | ||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||
|  | ||||
|     update news file | ||||
|   | ||||
| @@ -1,3 +1,3 @@ | ||||
| NAME=		openrc | ||||
| VERSION=	0.36 | ||||
| VERSION=	0.35.5 | ||||
| PKG=		${NAME}-${VERSION} | ||||
|   | ||||
							
								
								
									
										14
									
								
								NEWS.md
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								NEWS.md
									
									
									
									
									
								
							| @@ -4,20 +4,6 @@ OpenRC NEWS | ||||
| This file will contain a list of notable changes for each release. Note | ||||
| the information in this file is in reverse order. | ||||
|  | ||||
| ## OpenRC 0.36 | ||||
|  | ||||
| In this release, the modules-load service has been combined into the | ||||
| modules service since there is no reason I know of to keep them | ||||
| separate. However, modules also provides modules-load in case you were | ||||
| using modules-load in  your dependencies. | ||||
|  | ||||
| The consolefont, keymaps, numlock and procfs service scripts no longer | ||||
| have a dependency on localmount. | ||||
| If you are a linux user and are still separaating / from /usr, | ||||
| you will need to add the following line to the appropriate conf.d files: | ||||
|  | ||||
| rc_need="localmount" | ||||
|  | ||||
| ## OpenRC 0.35 | ||||
|  | ||||
| In this version, the cgroups mounting logic has been moved from the | ||||
|   | ||||
| @@ -19,10 +19,10 @@ SRCS-FreeBSD=	hostid.in modules.in moused.in newsyslog.in pf.in rarpd.in \ | ||||
| 		rc-enabled.in rpcbind.in savecore.in syslogd.in | ||||
| # These are FreeBSD specific | ||||
| SRCS-FreeBSD+=	adjkerntz.in devd.in dumpon.in encswap.in ipfw.in \ | ||||
| 		mixer.in nscd.in powerd.in syscons.in | ||||
| 		modules-load.in mixer.in nscd.in powerd.in syscons.in | ||||
|  | ||||
| SRCS-Linux=	agetty.in binfmt.in devfs.in cgroups.in dmesg.in hwclock.in \ | ||||
| 	consolefont.in keymaps.in killprocs.in modules.in \ | ||||
| 	consolefont.in keymaps.in killprocs.in modules.in modules-load.in \ | ||||
| 	mount-ro.in mtab.in numlock.in procfs.in net-online.in sysfs.in \ | ||||
| termencoding.in | ||||
|  | ||||
|   | ||||
| @@ -13,7 +13,7 @@ description="Sets a font for the consoles." | ||||
|  | ||||
| depend() | ||||
| { | ||||
| 	need termencoding | ||||
| 	need localmount termencoding | ||||
| 	after hotplug bootmisc modules | ||||
| 	keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu | ||||
| } | ||||
|   | ||||
| @@ -13,7 +13,7 @@ description="Applies a keymap for the consoles." | ||||
|  | ||||
| depend() | ||||
| { | ||||
| 	need termencoding | ||||
| 	need localmount termencoding | ||||
| 	after bootmisc clock | ||||
| 	keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu | ||||
| } | ||||
|   | ||||
							
								
								
									
										72
									
								
								init.d/modules-load.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								init.d/modules-load.in
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,72 @@ | ||||
| #!@SBINDIR@/openrc-run | ||||
| # Copyright (c) 2016 The OpenRC Authors. | ||||
| # See the Authors file at the top-level directory of this distribution and | ||||
| # https://github.com/OpenRC/openrc/blob/master/AUTHORS | ||||
| # | ||||
| # This file is part of OpenRC. It is subject to the license terms in | ||||
| # the LICENSE file found in the top-level directory of this | ||||
| # distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE | ||||
| # This file may not be copied, modified, propagated, or distributed | ||||
| # except according to the terms contained in the LICENSE file. | ||||
|  | ||||
| description="Loads a list of modules from systemd-compatible locations." | ||||
|  | ||||
| depend() | ||||
| { | ||||
| 	keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver | ||||
| } | ||||
|  | ||||
| find_modfiles() | ||||
| { | ||||
| 	local dirs="/usr/lib/modules-load.d /run/modules-load.d /etc/modules-load.d" | ||||
| 	local basenames files fn x y | ||||
| 	for x in $dirs; do | ||||
| 		[ ! -d $x ] && continue | ||||
| 		for y in $x/*.conf; do | ||||
| 			[ -f $y ] && basenames="${basenames}\n${y##*/}" | ||||
| 		done | ||||
| 	done | ||||
| 	basenames=$(printf "$basenames" | sort -u) | ||||
| 	for x in $basenames; do | ||||
| 		for y in $dirs; do | ||||
| 			[ -r $y/$x ] && | ||||
| 				fn=$y/$x | ||||
| 		done | ||||
| 		files="$files $fn" | ||||
| 	done | ||||
| 	echo $files | ||||
| } | ||||
|  | ||||
| load_modules() | ||||
| { | ||||
| 	local file m modules rc x | ||||
| 	file=$1 | ||||
| 	[ -z "$file" ] && return 0 | ||||
| 	while read m x; do | ||||
| 		case $m in | ||||
| 			\;*) continue ;; | ||||
| 			\#*) continue ;; | ||||
| 			*) modules="$modules $m" | ||||
| 			;; | ||||
| 		esac | ||||
| 	done < $file | ||||
| 	for x in $modules; do | ||||
| 		ebegin "Loading module $x" | ||||
| 		case "$RC_UNAME" in | ||||
| 			FreeBSD) kldload "$x"; rc=$? ;; | ||||
| 			Linux) modprobe --use-blacklist -q "$x"; rc=$? ;; | ||||
| 			*) ;; | ||||
| 		esac | ||||
| 		eend $rc "Failed to load $x" | ||||
| 	done | ||||
| } | ||||
|  | ||||
| start() | ||||
| { | ||||
| 	local x | ||||
| 	files=$(find_modfiles) | ||||
| 	for x in $files; do | ||||
| 		load_modules $x | ||||
| 	done | ||||
| 	return 0 | ||||
| } | ||||
| @@ -14,65 +14,10 @@ description="Loads a user defined list of kernel modules." | ||||
| depend() | ||||
| { | ||||
| 	use isapnp | ||||
| 	provide modules-load | ||||
| 	want modules-load | ||||
| 	keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver | ||||
| } | ||||
|  | ||||
| find_modfiles() | ||||
| { | ||||
| 	local dirs="/usr/lib/modules-load.d /run/modules-load.d /etc/modules-load.d" | ||||
| 	local basenames files fn x y | ||||
| 	for x in $dirs; do | ||||
| 		[ ! -d $x ] && continue | ||||
| 		for y in $x/*.conf; do | ||||
| 			[ -f $y ] && basenames="${basenames}\n${y##*/}" | ||||
| 		done | ||||
| 	done | ||||
| 	basenames=$(printf "$basenames" | sort -u) | ||||
| 	for x in $basenames; do | ||||
| 		for y in $dirs; do | ||||
| 			[ -r $y/$x ] && | ||||
| 				fn=$y/$x | ||||
| 		done | ||||
| 		files="$files $fn" | ||||
| 	done | ||||
| 	echo $files | ||||
| } | ||||
|  | ||||
| load_modules() | ||||
| { | ||||
| 	local file m modules rc x | ||||
| 	file=$1 | ||||
| 	[ -z "$file" ] && return 0 | ||||
| 	while read m x; do | ||||
| 		case $m in | ||||
| 			\;*) continue ;; | ||||
| 			\#*) continue ;; | ||||
| 			*) modules="$modules $m" | ||||
| 			;; | ||||
| 		esac | ||||
| 	done < $file | ||||
| 	for x in $modules; do | ||||
| 		ebegin "Loading module $x" | ||||
| 		case "$RC_UNAME" in | ||||
| 			FreeBSD) kldload "$x"; rc=$? ;; | ||||
| 			Linux) modprobe --use-blacklist -q "$x"; rc=$? ;; | ||||
| 			*) ;; | ||||
| 		esac | ||||
| 		eend $rc "Failed to load $x" | ||||
| 	done | ||||
| } | ||||
|  | ||||
| modules_load_d() | ||||
| { | ||||
| 	local x | ||||
| 	files=$(find_modfiles) | ||||
| 	for x in $files; do | ||||
| 		load_modules $x | ||||
| 	done | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| FreeBSD_modules() | ||||
| { | ||||
| 	local cnt=0 x | ||||
| @@ -137,10 +82,7 @@ Linux_modules() | ||||
| start() | ||||
| { | ||||
| 	case "$RC_UNAME" in | ||||
| 		FreeBSD|Linux)  | ||||
| 			modules_load_d | ||||
| 			${RC_UNAME}_modules | ||||
| 			;; | ||||
| 		FreeBSD|Linux) ${RC_UNAME}_modules ;; | ||||
| 		*) ;; | ||||
| 	esac | ||||
| 	return 0 | ||||
|   | ||||
| @@ -13,7 +13,7 @@ description="Delays until the network is online or a specific timeout" | ||||
|  | ||||
| depend() | ||||
| { | ||||
| 	after modules net | ||||
| 	after modules | ||||
| 	need sysfs | ||||
| 	provide network-online | ||||
| 	keyword -docker -jail -lxc -openvz -prefix -systemd-nspawn -uml -vserver | ||||
|   | ||||
| @@ -15,6 +15,7 @@ ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}} | ||||
|  | ||||
| depend() | ||||
| { | ||||
| 	need localmount | ||||
| 	keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -16,6 +16,7 @@ depend() | ||||
| 	after clock | ||||
| 	use devfs | ||||
| 	want modules | ||||
| 	need localmount | ||||
| 	keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -49,7 +49,7 @@ start() | ||||
| 	fi | ||||
| 	ebegin "Saving dependency cache" | ||||
| 	local rc=0 save= | ||||
| 	for x in depconfig deptree rc.log shutdowntime softlevel; do | ||||
| 	for x in shutdowntime softlevel rc.log; do | ||||
| 		[ -e "$RC_SVCDIR/$x" ] && save="$save $RC_SVCDIR/$x" | ||||
| 	done | ||||
| 	if [ -n "$save" ]; then | ||||
|   | ||||
| @@ -119,9 +119,6 @@ The amount of time, in milliseconds, s6-svc should wait for the service | ||||
| to go down when stopping the service. The default is 60000. | ||||
| .It Ar start_stop_daemon_args | ||||
| List of arguments passed to start-stop-daemon when starting the daemon. | ||||
| .It Ar supervise_daemon_args | ||||
| List of arguments passed to supervise-daemon when starting the daemon. | ||||
| If undefined, start_stop_daemon_args is used as a fallback. | ||||
| .It Ar command | ||||
| Daemon to start or stop via | ||||
| .Nm start-stop-daemon | ||||
| @@ -597,7 +594,7 @@ rc_net_tap1_provide="!net" | ||||
| # It's also possible to negate keywords. This is mainly useful for prefix | ||||
| # users testing OpenRC. | ||||
| rc_keyword="!-prefix" | ||||
| # This can also be used to block a script from running in all | ||||
| # This can also be used to block a script from runining in all | ||||
| # containers except one or two | ||||
| rc_keyword="!-containers !-docker" | ||||
| .Ed | ||||
|   | ||||
| @@ -20,14 +20,6 @@ | ||||
| .Ar service cmd | ||||
| .Op Ar ... | ||||
| .Nm | ||||
| .Fl d , -debug | ||||
| .Ar service cmd | ||||
| .Op Ar ... | ||||
| .Nm | ||||
| .Fl D , -nodeps | ||||
| .Ar service cmd | ||||
| .Op Ar ... | ||||
| .Nm | ||||
| .Op Fl i , -ifexists | ||||
| .Ar service cmd | ||||
| .Op Ar ... | ||||
| @@ -40,21 +32,9 @@ | ||||
| .Ar service cmd | ||||
| .Op Ar ... | ||||
| .Nm | ||||
| .Op Fl s , -ifstarted | ||||
| .Ar service cmd | ||||
| .Op Ar ... | ||||
| .Nm | ||||
| .Op Fl S , -ifstopped | ||||
| .Ar service cmd | ||||
| .Op Ar ... | ||||
| .Nm | ||||
| .Fl e , -exists | ||||
| .Ar service | ||||
| .Nm | ||||
| .Fl Z , -dry-run | ||||
| .Ar service cmd | ||||
| .Op Ar ... | ||||
| .Nm | ||||
| .Fl l , -list | ||||
| .Nm | ||||
| .Fl r , -resolve | ||||
| @@ -88,15 +68,6 @@ return 0 if it can find | ||||
| otherwise -1. | ||||
| .Fl r , -resolve | ||||
| does the same and also prints the full path of the service to stdout. | ||||
| .Pp | ||||
| .Fl d , -debug | ||||
| sets -x when running the service script(s). | ||||
| .Pp | ||||
| .Fl D , -nodeps | ||||
| ignores dependencies when running the service. | ||||
| .Pp | ||||
| .Fl Z , -dry-run | ||||
| displays commands rather than executing them. | ||||
| .Sh SEE ALSO | ||||
| .Xr openrc 8 , | ||||
| .Xr stdout 3 | ||||
|   | ||||
| @@ -11,7 +11,7 @@ | ||||
| SFX=		.Linux.in | ||||
| PKG_PREFIX?=	/usr | ||||
|  | ||||
| CPPFLAGS+=	-D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L | ||||
| CPPFLAGS+=	-D_DEFAULT_SOURCE | ||||
| LIBDL=		-Wl,-Bdynamic -ldl | ||||
|  | ||||
| ifeq (${MKSELINUX},yes) | ||||
|   | ||||
| @@ -45,20 +45,20 @@ SBINDIR?=		${PREFIX}/sbin | ||||
| SBINMODE?=		0755 | ||||
|  | ||||
| INCDIR?=		${UPREFIX}/include | ||||
| INCMODE?=		0644 | ||||
| INCMODE?=		0444 | ||||
|  | ||||
| _LIBNAME_SH=		case `readlink /lib` in /lib64|lib64) echo "lib64";; *) echo "lib";; esac | ||||
| _LIBNAME:=		$(shell ${_LIBNAME_SH}) | ||||
| LIBNAME?=		${_LIBNAME} | ||||
| LIBDIR?=		${UPREFIX}/${LIBNAME} | ||||
| LIBMODE?=		0644 | ||||
| LIBMODE?=		0444 | ||||
| SHLIBDIR?=		${PREFIX}/${LIBNAME} | ||||
|  | ||||
| LIBEXECDIR?=		${PREFIX}/libexec/rc | ||||
|  | ||||
| MANPREFIX?=		${UPREFIX}/share | ||||
| MANDIR?=		${MANPREFIX}/man | ||||
| MANMODE?=		0644 | ||||
| MANMODE?=		0444 | ||||
|  | ||||
| BASHCOMPDIR?=		${UPREFIX}/share/bash-completion/completions | ||||
|  | ||||
|   | ||||
| @@ -133,10 +133,11 @@ _status() | ||||
| 	elif service_inactive; then | ||||
| 		ewarn "status: inactive" | ||||
| 		return 16 | ||||
| 	elif service_crashed; then | ||||
| 		eerror "status: crashed" | ||||
| 		return 32 | ||||
| 	elif service_started; then | ||||
| 		if service_crashed; then | ||||
| 			eerror "status: crashed" | ||||
| 			return 32 | ||||
| 		fi | ||||
| 		einfo "status: started" | ||||
| 		return 0 | ||||
| 	else | ||||
|   | ||||
| @@ -34,7 +34,7 @@ supervise_start() | ||||
| 		${respawn_period:+--respawn-period} $respawn_period \ | ||||
| 		${command_user+--user} $command_user \ | ||||
| 		${umask+--umask} $umask \ | ||||
| 		${supervise_daemon_args:-${start_stop_daemon_args}} \ | ||||
| 		$supervise_daemon_args \ | ||||
| 		$command \ | ||||
| 		-- $command_args $command_args_foreground | ||||
| 	rc=$? | ||||
|   | ||||
| @@ -66,6 +66,9 @@ int parse_mode(mode_t *, char *); | ||||
| /* Handy function so we can wrap einfo around our deptree */ | ||||
| RC_DEPTREE *_rc_deptree_load (int, int *); | ||||
|  | ||||
| /* Test to see if we can see pid 1 or not */ | ||||
| bool _rc_can_find_pids(void); | ||||
|  | ||||
| RC_SERVICE lookup_service_state(const char *service); | ||||
| void from_time_t(char *time_string, time_t tv); | ||||
| time_t to_time_t(char *timestring); | ||||
|   | ||||
| @@ -50,7 +50,6 @@ static const rc_service_state_name_t rc_service_state_names[] = { | ||||
| 	{ RC_SERVICE_HOTPLUGGED,  "hotplugged" }, | ||||
| 	{ RC_SERVICE_FAILED,      "failed" }, | ||||
| 	{ RC_SERVICE_SCHEDULED,   "scheduled"}, | ||||
| 	{ RC_SERVICE_CRASHED,     "crashed"}, | ||||
| 	{ 0, NULL} | ||||
| }; | ||||
|  | ||||
| @@ -849,10 +848,6 @@ rc_service_state(const char *service) | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if (state & RC_SERVICE_STARTED) { | ||||
| 		if (rc_service_daemons_crashed(service)) | ||||
| 			state |= RC_SERVICE_CRASHED; | ||||
| 	} | ||||
| 	if (state & RC_SERVICE_STOPPED) { | ||||
| 		dirs = ls_dir(RC_SVCDIR "/scheduled", 0); | ||||
| 		TAILQ_FOREACH(dir, dirs, entries) { | ||||
|   | ||||
| @@ -188,8 +188,7 @@ typedef enum | ||||
| 	/* Optional states service could also be in */ | ||||
| 	RC_SERVICE_FAILED      = 0x0200, | ||||
| 	RC_SERVICE_SCHEDULED   = 0x0400, | ||||
| 	RC_SERVICE_WASINACTIVE = 0x0800, | ||||
| 	RC_SERVICE_CRASHED     = 0x1000, | ||||
| 	RC_SERVICE_WASINACTIVE = 0x0800 | ||||
| } RC_SERVICE; | ||||
|  | ||||
| /*! Add the service to the runlevel | ||||
|   | ||||
							
								
								
									
										1
									
								
								src/rc/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								src/rc/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -56,7 +56,6 @@ mark_service_inactive | ||||
| mark_service_wasinactive | ||||
| mark_service_hotplugged | ||||
| mark_service_failed | ||||
| mark_service_crashed | ||||
| rc-abort | ||||
| rc | ||||
| openrc | ||||
|   | ||||
| @@ -41,7 +41,6 @@ RC_SBINPROGS=	mark_service_starting mark_service_started \ | ||||
| 		mark_service_stopping mark_service_stopped \ | ||||
| 		mark_service_inactive mark_service_wasinactive \ | ||||
| 		mark_service_hotplugged mark_service_failed \ | ||||
| 		mark_service_crashed \ | ||||
| 		rc-abort swclock | ||||
|  | ||||
| ifeq (${OS},Linux) | ||||
| @@ -124,8 +123,7 @@ is_older_than: is_older_than.o rc-misc.o | ||||
| mark_service_starting mark_service_started \ | ||||
| mark_service_stopping mark_service_stopped \ | ||||
| mark_service_inactive mark_service_wasinactive \ | ||||
| mark_service_hotplugged mark_service_failed \ | ||||
| mark_service_crashed: do_mark_service.o rc-misc.o | ||||
| mark_service_hotplugged mark_service_failed: do_mark_service.o rc-misc.o | ||||
| 	${CC} ${LOCAL_CFLAGS} ${LOCAL_LDFLAGS} ${CFLAGS} ${LDFLAGS} -o $@ $^ ${LDADD} | ||||
|  | ||||
| mountinfo: mountinfo.o _usage.o rc-misc.o | ||||
|   | ||||
| @@ -68,7 +68,9 @@ int main(int argc, char **argv) | ||||
| 		ok = rc_service_started_daemon(service, exec, NULL, idx); | ||||
|  | ||||
| 	} else if (strcmp(applet, "service_crashed") == 0) { | ||||
| 		ok = ( rc_service_daemons_crashed(service) && errno != EACCES); | ||||
| 		ok = (_rc_can_find_pids() && | ||||
| 		    rc_service_daemons_crashed(service) && | ||||
| 		    errno != EACCES); | ||||
| 	} else | ||||
| 		eerrorx("%s: unknown applet", applet); | ||||
|  | ||||
|   | ||||
| @@ -1268,9 +1268,6 @@ int main(int argc, char **argv) | ||||
| 		case_RC_COMMON_GETOPT | ||||
| 		} | ||||
|  | ||||
| 	if (rc_yesno(getenv("RC_NODEPS"))) | ||||
| 		deps = false; | ||||
|  | ||||
| 	/* If we're changing runlevels and not called by rc then we cannot | ||||
| 	   work with any dependencies */ | ||||
| 	if (deps && getenv("RC_PID") == NULL && | ||||
| @@ -1285,8 +1282,6 @@ int main(int argc, char **argv) | ||||
| 		unsetenv("IN_BACKGROUND"); | ||||
| 	} | ||||
|  | ||||
| 	if (rc_yesno(getenv("IN_DRYRUN"))) | ||||
| 	dry_run = true; | ||||
| 	if (rc_yesno(getenv("IN_HOTPLUG"))) { | ||||
| 		if (!service_plugable()) | ||||
| 			eerrorx("%s: not allowed to be hotplugged", applet); | ||||
|   | ||||
| @@ -87,8 +87,6 @@ write_log(int logfd, const char *buffer, size_t bytes) | ||||
| 		} | ||||
|  | ||||
| 		if (!in_escape) { | ||||
| 			if (!isprint((int) *p) && *p != '\n') | ||||
| 				goto cont; | ||||
| 			if (write(logfd, p++, 1) == -1) | ||||
| 				eerror("write: %s", strerror(errno)); | ||||
| 			continue; | ||||
|   | ||||
| @@ -51,8 +51,7 @@ rc_conf_yesno(const char *setting) | ||||
|  | ||||
| static const char *const env_whitelist[] = { | ||||
| 	"EERROR_QUIET", "EINFO_QUIET", | ||||
| 	"IN_BACKGROUND", "IN_DRYRUN", "IN_HOTPLUG", | ||||
| 	"RC_DEBUG", "RC_NODEPS", | ||||
| 	"IN_BACKGROUND", "IN_HOTPLUG", | ||||
| 	"LANG", "LC_MESSAGES", "TERM", | ||||
| 	"EINFO_COLOR", "EINFO_VERBOSE", | ||||
| 	NULL | ||||
| @@ -411,6 +410,34 @@ RC_DEPTREE * _rc_deptree_load(int force, int *regen) | ||||
| 	return rc_deptree_load(); | ||||
| } | ||||
|  | ||||
| bool _rc_can_find_pids(void) | ||||
| { | ||||
| 	RC_PIDLIST *pids; | ||||
| 	RC_PID *pid; | ||||
| 	RC_PID *pid2; | ||||
| 	bool retval = false; | ||||
|  | ||||
| 	if (geteuid() == 0) | ||||
| 		return true; | ||||
|  | ||||
| 	/* If we cannot see process 1, then we don't test to see if | ||||
| 	 * services crashed or not */ | ||||
| 	pids = rc_find_pids(NULL, NULL, 0, 1); | ||||
| 	if (pids) { | ||||
| 		pid = LIST_FIRST(pids); | ||||
| 		if (pid) { | ||||
| 			retval = true; | ||||
| 			while (pid) { | ||||
| 				pid2 = LIST_NEXT(pid, entries); | ||||
| 				free(pid); | ||||
| 				pid = pid2; | ||||
| 			} | ||||
| 		} | ||||
| 		free(pids); | ||||
| 	} | ||||
| 	return retval; | ||||
| } | ||||
|  | ||||
| static const struct { | ||||
| 	const char * const name; | ||||
| 	RC_SERVICE bit; | ||||
| @@ -423,7 +450,6 @@ static const struct { | ||||
| 	{ "service_hotplugged",  RC_SERVICE_HOTPLUGGED,  }, | ||||
| 	{ "service_wasinactive", RC_SERVICE_WASINACTIVE, }, | ||||
| 	{ "service_failed",      RC_SERVICE_FAILED,      }, | ||||
| 	{ "service_crashed",     RC_SERVICE_CRASHED,     }, | ||||
| }; | ||||
|  | ||||
| RC_SERVICE lookup_service_state(const char *service) | ||||
|   | ||||
| @@ -29,25 +29,18 @@ | ||||
|  | ||||
| const char *applet = NULL; | ||||
| const char *extraopts = NULL; | ||||
| const char *getoptstring = "cdDe:ilr:INsSZ" getoptstring_COMMON; | ||||
| const char *getoptstring = "ce:ilr:IN" getoptstring_COMMON; | ||||
| const struct option longopts[] = { | ||||
| 	{ "debug",     0, NULL, 'd' }, | ||||
| 	{ "nodeps",     0, NULL, 'D' }, | ||||
| 	{ "exists",   1, NULL, 'e' }, | ||||
| 	{ "ifcrashed", 0, NULL, 'c' }, | ||||
| 	{ "ifexists", 0, NULL, 'i' }, | ||||
| 	{ "ifinactive", 0, NULL, 'I' }, | ||||
| 	{ "ifnotstarted", 0, NULL, 'N' }, | ||||
| 	{ "ifstarted", 0, NULL, 's' }, | ||||
| 	{ "ifstopped", 0, NULL, 'S' }, | ||||
| 	{ "list",     0, NULL, 'l' }, | ||||
| 	{ "resolve",  1, NULL, 'r' }, | ||||
| 	{ "dry-run",     0, NULL, 'Z' }, | ||||
| 	longopts_COMMON | ||||
| }; | ||||
| const char * const longopts_help[] = { | ||||
| 	"set xtrace when running the command", | ||||
| 	"ignore dependencies", | ||||
| 	"tests if the service exists or not", | ||||
| 	"if the service is crashed then run the command", | ||||
| 	"if the service exists then run the command", | ||||
| @@ -55,7 +48,6 @@ const char * const longopts_help[] = { | ||||
| 	"if the service is not started then run the command", | ||||
| 	"list all available services", | ||||
| 	"resolve the service name to an init script", | ||||
| 	"dry run (show what would happen)", | ||||
| 	longopts_help_COMMON | ||||
| }; | ||||
| const char *usagestring = ""							\ | ||||
| @@ -75,8 +67,6 @@ int main(int argc, char **argv) | ||||
| 	bool if_exists = false; | ||||
| 	bool if_inactive = false; | ||||
| 	bool if_notstarted = false; | ||||
| 	bool if_started = false; | ||||
| 	bool if_stopped = false; | ||||
|  | ||||
| 	applet = basename_c(argv[0]); | ||||
| 	/* Ensure that we are only quiet when explicitly told to be */ | ||||
| @@ -86,12 +76,6 @@ int main(int argc, char **argv) | ||||
| 		    longopts, (int *) 0)) != -1) | ||||
| 	{ | ||||
| 		switch (opt) { | ||||
| 		case 'd': | ||||
| 			setenv("RC_DEBUG", "yes", 1); | ||||
| 			break; | ||||
| 		case 'D': | ||||
| 			setenv("RC_NODEPS", "yes", 1); | ||||
| 			break; | ||||
| 		case 'e': | ||||
| 			service = rc_service_resolve(optarg); | ||||
| 			opt = service ? EXIT_SUCCESS : EXIT_FAILURE; | ||||
| @@ -128,15 +112,6 @@ int main(int argc, char **argv) | ||||
| 			free(service); | ||||
| 			return EXIT_SUCCESS; | ||||
| 			/* NOTREACHED */ | ||||
| 		case 's': | ||||
| 			if_started = true; | ||||
| 			break; | ||||
| 		case 'S': | ||||
| 			if_stopped = true; | ||||
| 			break; | ||||
| 		case 'Z': | ||||
| 			setenv("IN_DRYRUN", "yes", 1); | ||||
| 			break; | ||||
|  | ||||
| 		case_RC_COMMON_GETOPT | ||||
| 		} | ||||
| @@ -158,10 +133,6 @@ int main(int argc, char **argv) | ||||
| 		return 0; | ||||
| 	if (if_notstarted && (state & RC_SERVICE_STARTED)) | ||||
| 		return 0; | ||||
| 	if (if_started && ! (state & RC_SERVICE_STARTED)) | ||||
| 		return 0; | ||||
| 	if (if_stopped && ! (state & RC_SERVICE_STOPPED)) | ||||
| 		return 0; | ||||
| 	*argv = service; | ||||
| 	execv(*argv, argv); | ||||
| 	eerrorx("%s: %s", applet, strerror(errno)); | ||||
|   | ||||
| @@ -54,6 +54,7 @@ const char *usagestring = ""						\ | ||||
| 	"Usage: rc-status [options] <runlevel>...\n"		\ | ||||
| 	"   or: rc-status [options] [-a | -c | -l | -m | -r | -s | -u]"; | ||||
|  | ||||
| static bool test_crashed = false; | ||||
| static RC_DEPTREE *deptree; | ||||
| static RC_STRINGLIST *types; | ||||
|  | ||||
| @@ -144,7 +145,9 @@ print_service(const char *service) | ||||
| 		color = ECOLOR_WARN; | ||||
| 	} else if (state & RC_SERVICE_STARTED) { | ||||
| 		errno = 0; | ||||
| 		if (rc_service_daemons_crashed(service) && errno != EACCES) | ||||
| 		if (test_crashed && | ||||
| 		    rc_service_daemons_crashed(service) && | ||||
| 		    errno != EACCES) | ||||
| 		{ | ||||
| 			child_pid = rc_service_value_get(service, "child_pid"); | ||||
| 			start_time = rc_service_value_get(service, "start_time"); | ||||
| @@ -237,6 +240,8 @@ int main(int argc, char **argv) | ||||
| 	char *p, *runlevel = NULL; | ||||
| 	int opt, retval = 0; | ||||
|  | ||||
| 	test_crashed = _rc_can_find_pids(); | ||||
|  | ||||
| 	applet = basename_c(argv[0]); | ||||
| 	while ((opt = getopt_long(argc, argv, getoptstring, longopts, | ||||
| 				  (int *) 0)) != -1) | ||||
|   | ||||
| @@ -62,7 +62,7 @@ add(const char *runlevel, const char *service) | ||||
|  | ||||
| 	if (!rc_service_exists(service)) { | ||||
| 		if (errno == ENOEXEC) | ||||
| 			eerror("%s: service `%s' is not executable", | ||||
| 			eerror("%s: service `%s' is not executeable", | ||||
| 			    applet, service); | ||||
| 		else | ||||
| 			eerror("%s: service `%s' does not exist", | ||||
|   | ||||
| @@ -661,7 +661,7 @@ int main(int argc, char **argv) | ||||
| 			parse_schedule(applet, NULL, sig); | ||||
| 		if (pidfile) { | ||||
| 			pid = get_pid(applet, pidfile); | ||||
| 			if (pid == -1 && errno != ENOENT) | ||||
| 			if (pid == -1) | ||||
| 				exit(EXIT_FAILURE); | ||||
| 		} else { | ||||
| 			pid = 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user