Compare commits
	
		
			9 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					f09ae94000 | ||
| 
						 | 
					2e22b32f60 | ||
| 
						 | 
					c283fb6b67 | ||
| 
						 | 
					cf5ccbc759 | ||
| 
						 | 
					90ee9cd49d | ||
| 
						 | 
					a7f92e3219 | ||
| 
						 | 
					8ae9a9b856 | ||
| 
						 | 
					c4ebd431c9 | ||
| 
						 | 
					7e885f37bb | 
							
								
								
									
										340
									
								
								ChangeLog
									
									
									
									
									
								
							
							
						
						
									
										340
									
								
								ChangeLog
									
									
									
									
									
								
							@@ -1,3 +1,77 @@
 | 
			
		||||
commit 2e22b32f600676495e5d5a6ccbf7b307c0588b1a
 | 
			
		||||
Author: Doug Freed <dwfreed@mtu.edu>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    start-stop-daemon: allow all standard signals
 | 
			
		||||
    
 | 
			
		||||
    Also we define the signalpair_item macro.
 | 
			
		||||
    This fixes #113.
 | 
			
		||||
    
 | 
			
		||||
    X-Gentoo-Bug: 604986
 | 
			
		||||
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604986
 | 
			
		||||
 | 
			
		||||
commit c283fb6b67efc83b9567e63aae5ef12cd8a463f4
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    version 0.23.2
 | 
			
		||||
 | 
			
		||||
commit cf5ccbc7599c0fed7e189c5f73cb632d5ab929c6
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    update ChangeLog
 | 
			
		||||
 | 
			
		||||
commit 90ee9cd49df773b2aef2acb2ca72ac92c3e62835
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    mountinfo: make the path to /proc/mounts a constant
 | 
			
		||||
    
 | 
			
		||||
    This path should not be hard coded in the open call.
 | 
			
		||||
    Linux prior to 2.4.19 did not have /proc/self/mounts, so for now I'm
 | 
			
		||||
    making this value /proc/mounts everywhere, but that may change to
 | 
			
		||||
    /proc/self/mounts on linux; I'm not sure we should care about <2.4.19.
 | 
			
		||||
    
 | 
			
		||||
    X-Gentoo-Bug: 604646
 | 
			
		||||
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604646
 | 
			
		||||
 | 
			
		||||
commit a7f92e3219d0a5278fe8bd742e2e5cb68048210e
 | 
			
		||||
Author: Benda Xu <heroxbd@gentoo.org>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    Clean up warnings that can use the _unused macro
 | 
			
		||||
    
 | 
			
		||||
    X-Gentoo-Bug: 604666
 | 
			
		||||
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
 | 
			
		||||
 | 
			
		||||
commit 8ae9a9b85614d6c3b246805c3be9e01d49f0b986
 | 
			
		||||
Author: Benda Xu <heroxbd@gentoo.org>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    Indentation fixes
 | 
			
		||||
    
 | 
			
		||||
    X-Gentoo-Bug: 604666
 | 
			
		||||
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
 | 
			
		||||
 | 
			
		||||
commit c4ebd431c9997e21c82ba020f36c549d1e1bb53c
 | 
			
		||||
Author: Doug Freed <dwfreed@mtu.edu>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    loopback: drop explicit route for BSD too
 | 
			
		||||
 | 
			
		||||
commit 7e885f37bbe40e098bb84562348a776b60cf17a3
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    version 0.23.1
 | 
			
		||||
 | 
			
		||||
commit a15cff21c63f2ad951af1c59a74fc7d37f78e91b
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    update ChangeLog
 | 
			
		||||
 | 
			
		||||
commit 45aa36cc623eeeb15fb6827b57e0c07a37cdef41
 | 
			
		||||
Author: Doug Freed <dwfreed@mtu.edu>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
@@ -1131,269 +1205,3 @@ Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
    
 | 
			
		||||
    X-Gentoo-Bug: 523174
 | 
			
		||||
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523174
 | 
			
		||||
 | 
			
		||||
commit 47dd5e37cbf372df3ee0fad2c87226dce5b51587
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    add back deprecation warnings lost during refactoring
 | 
			
		||||
 | 
			
		||||
commit e277ae57efaba3be3eb619fd00084b116c370231
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    fix tests
 | 
			
		||||
    
 | 
			
		||||
    X-Gentoo-Bug: 572602
 | 
			
		||||
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572602
 | 
			
		||||
 | 
			
		||||
commit 69f052b611878d771fc3f56ee77639269db9b6e1
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    librc: Complain when a real and virtual service have the same name
 | 
			
		||||
 | 
			
		||||
commit e4eacf02cae10eca48f6906592981d701b0c1973
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    openrc-run: in verbose mode, log execution of the shell script
 | 
			
		||||
    
 | 
			
		||||
    This is to show when openrc-run runs the openrc-run.sh script; it is
 | 
			
		||||
    used for debugging.
 | 
			
		||||
 | 
			
		||||
commit 30c3561b6b648d60174a22a73555b680d2cc86fc
 | 
			
		||||
Author: Colin Booth <colin@heliocat.net>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    sh/s6.sh: update s6-svc syntax to be valid for 2.2.0.0+
 | 
			
		||||
    
 | 
			
		||||
    The s6-svc syntax changed for wait-up, wait-ready, wait-down, and
 | 
			
		||||
    wait-finished. This changes the s6 handling script to use the current
 | 
			
		||||
    valid syntax.
 | 
			
		||||
    
 | 
			
		||||
    This fixes #65.
 | 
			
		||||
 | 
			
		||||
commit 5f2850366ea0f30f0f9cb6b129b69192c11e74ac
 | 
			
		||||
Author: Manuel Rüger <manuel@rueg.eu>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    Fix typo
 | 
			
		||||
    
 | 
			
		||||
    This fixes #70.
 | 
			
		||||
 | 
			
		||||
commit 1cb7eec31f37db0de11a4b39939fd3fbe17c1e24
 | 
			
		||||
Author: Gokturk Yuksek <gokturk@binghamton.edu>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    conf.d/bootmisc: typo fix: s/dmesc/dmesg/
 | 
			
		||||
    
 | 
			
		||||
    This fixes #72.
 | 
			
		||||
 | 
			
		||||
commit cd7883d25d0a9321b68df1c1e6ad9662306fa9e7
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    localmount: Allow users to control whether errors are ignored
 | 
			
		||||
    
 | 
			
		||||
    X-Gentoo-Bug: 572138
 | 
			
		||||
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572138
 | 
			
		||||
 | 
			
		||||
commit 62b49b2a3ad1c13012305b4d7281d7f6543c70d7
 | 
			
		||||
Author: Doug Freed <dwfreed@mtu.edu>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    rc: remove use of magic constant and allow OpenVZ to drop to shell
 | 
			
		||||
    
 | 
			
		||||
    OpenVZ has had console support for a long time now; allow them to use it
 | 
			
		||||
    to drop to a shell during interactive boot.
 | 
			
		||||
 | 
			
		||||
commit 4c814a0a285565bc09d662f602f93dbb938503c6
 | 
			
		||||
Author: Doug Freed <dwfreed@mtu.edu>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    librc: handle rc_sys="prefix" even if we weren't built with a prefix
 | 
			
		||||
    
 | 
			
		||||
    This probably isn't needed, but it mimics old behavior.
 | 
			
		||||
 | 
			
		||||
commit 36dde4e7f21afba36a96837aa86f2b5d2dae3807
 | 
			
		||||
Author: Doug Freed <dwfreed@mtu.edu>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    librc: fix handling the nothing special case for rc_sys
 | 
			
		||||
 | 
			
		||||
commit 649f63d882d53533ae8b1c3b28967e772e738c45
 | 
			
		||||
Author: Doug Freed <dwfreed@mtu.edu>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    librc: move system detection code into rc_sys and use it
 | 
			
		||||
    
 | 
			
		||||
    This fixes an issue where librc code was calling code that only existed
 | 
			
		||||
    in the rc binary.
 | 
			
		||||
    
 | 
			
		||||
    This reverts commits 8addd79 and 9f6e056
 | 
			
		||||
    
 | 
			
		||||
    This fixes #75.
 | 
			
		||||
 | 
			
		||||
commit 55a28f5d2524615560698453a5a6afd50460030c
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    Revert "rc: make get_systype similar to the old rc_sys function"
 | 
			
		||||
    
 | 
			
		||||
    This reverts commit f79a7a7be18d68bf264efc60d82838d03048da6b.
 | 
			
		||||
 | 
			
		||||
commit 6c0942137572608d02eb4b34bad55c9bf418a6ba
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    Revert "librc: fix librc-depend functions to call rc_sys"
 | 
			
		||||
    
 | 
			
		||||
    This reverts commit 73482cf13a338051606788957cbd0031ac850c70.
 | 
			
		||||
 | 
			
		||||
commit 79359f77cc786e18695368bccb6b6186ecfe38c0
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    fix bsd build
 | 
			
		||||
    
 | 
			
		||||
    X-Gentoo-Bug: 572068
 | 
			
		||||
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572068
 | 
			
		||||
 | 
			
		||||
commit f79a7a7be18d68bf264efc60d82838d03048da6b
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    rc: make get_systype similar to the old rc_sys function
 | 
			
		||||
 | 
			
		||||
commit 73482cf13a338051606788957cbd0031ac850c70
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    librc: fix librc-depend functions to call rc_sys
 | 
			
		||||
 | 
			
		||||
commit 0910c455d3723ac4d4b793afb61cd82f660547f4
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    src/rc/Makefile: fix make depend target
 | 
			
		||||
 | 
			
		||||
commit f5e06bc55ab1717ddff8c21f00f48cfcba8cb4a7
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    include rc.h properly in source files
 | 
			
		||||
    
 | 
			
		||||
    We were attempting to include rc.h in rc-misc.h instead of the source
 | 
			
		||||
    files where it should be included.
 | 
			
		||||
 | 
			
		||||
commit e7ae08c38d4753d8d54a4ed60ca98794d85aadd9
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    version 0.21
 | 
			
		||||
 | 
			
		||||
commit 6da0abc0850dfc99df0ba50cbd0092929ec0107b
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    fix selinux build
 | 
			
		||||
    
 | 
			
		||||
    X-Gentoo-Bug: 571798
 | 
			
		||||
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=571798
 | 
			
		||||
 | 
			
		||||
commit b34df9dd817069ade7e0526a59aaa9d3f2beb806
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    fix selinux build
 | 
			
		||||
 | 
			
		||||
commit 6f02069746f4d8a2331ab7e000abdca9bbdd622d
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    Add LANG, LC_MESSAGES and TERM to the environment whitelist
 | 
			
		||||
 | 
			
		||||
commit d4c7207ef3906daf6f8646e8deb6d968fe76cb36
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    fix seg fault
 | 
			
		||||
 | 
			
		||||
commit 04f05c30d13ec83b85164a536eb570f29a66b275
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    update ChangeLog
 | 
			
		||||
 | 
			
		||||
commit 9473ac514cb72663d5c3bac8b5473cced4a20bf7
 | 
			
		||||
Author: joe9 <joe9mail@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    allow the user to decide whether fsck aborts for errors
 | 
			
		||||
    
 | 
			
		||||
    X-Gentoo-Bug: 564008
 | 
			
		||||
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=564008
 | 
			
		||||
 | 
			
		||||
commit bf2f40828ee26d3ba9185f29db596ee5d7b9cf61
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    Remove multicall binary structure from OpenRC
 | 
			
		||||
    
 | 
			
		||||
    This eliminates the need for the selinux-specific wrapper scrript we
 | 
			
		||||
    were installing in /lib*/rc/{bin,sbin}.
 | 
			
		||||
 | 
			
		||||
commit fe485f44339963fdbee143687dcbef2069924bc6
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    rc: fix compiler warnings cleanup
 | 
			
		||||
    
 | 
			
		||||
    This reverts commit 981d2b3308edb0d0a68f7bdce4f2c99110de6940 and fixes
 | 
			
		||||
    the warnings that generated.
 | 
			
		||||
 | 
			
		||||
commit 53bc986ce5f9725d7117356e28224ac898f9c9bf
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    Clean default env_whitelist
 | 
			
		||||
    
 | 
			
		||||
    The whitelist of environment variables we pass to service scripts
 | 
			
		||||
    included several unnecessary variables.
 | 
			
		||||
    
 | 
			
		||||
    The default whitelist now includes EERROR_QUIET, EINFO_QUIET,
 | 
			
		||||
    IN_BACKGROUND and IN_HOTPLUG.
 | 
			
		||||
    
 | 
			
		||||
    X-Gentoo-Bug: 569542
 | 
			
		||||
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=569542
 | 
			
		||||
 | 
			
		||||
commit 981d2b3308edb0d0a68f7bdce4f2c99110de6940
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    rc: clean up compiler warnings
 | 
			
		||||
    
 | 
			
		||||
    The get_systype(), detect_container(), detect_prefix() and detect_vm()
 | 
			
		||||
    functions need to return "char *" instead of "const char *".
 | 
			
		||||
 | 
			
		||||
commit 5d3e85bc310e12411135e98a397b35fb920a72a3
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    add ignore patterns for init.d directory
 | 
			
		||||
 | 
			
		||||
commit 000503fad72e4eb2ef956a24df358be84b2a9493
 | 
			
		||||
Author: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
 | 
			
		||||
 | 
			
		||||
    Convert OpenRC to a centralized copyright/license structure
 | 
			
		||||
    
 | 
			
		||||
    In the past, OpenRC was a hybrid of a centralized and file-scope
 | 
			
		||||
    license/copyright structure.
 | 
			
		||||
    
 | 
			
		||||
    I followed the instructions from the Software Freedom Law Center [1] to
 | 
			
		||||
    convert to a Centralized structure where possible, for easier future
 | 
			
		||||
    maintenance.
 | 
			
		||||
    
 | 
			
		||||
    [1] https://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,3 @@
 | 
			
		||||
NAME=		openrc
 | 
			
		||||
VERSION=	0.23
 | 
			
		||||
VERSION=	0.23.2
 | 
			
		||||
PKG=		${NAME}-${VERSION}
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,6 @@ start()
 | 
			
		||||
	else
 | 
			
		||||
		ebegin "Bringing up network interface lo0"
 | 
			
		||||
		ifconfig lo0 127.0.0.1 netmask 255.0.0.0
 | 
			
		||||
		route -q add -inet 127.0.0.0 -netmask 255.0.0.0 127.0.0.1
 | 
			
		||||
	fi
 | 
			
		||||
	eend $?
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,7 @@
 | 
			
		||||
 | 
			
		||||
#include "queue.h"
 | 
			
		||||
#include "librc.h"
 | 
			
		||||
#include "helpers.h"
 | 
			
		||||
 | 
			
		||||
bool
 | 
			
		||||
rc_yesno(const char *value)
 | 
			
		||||
@@ -118,7 +119,7 @@ rc_getline(char **line, size_t *len, FILE *fp)
 | 
			
		||||
librc_hidden_def(rc_getline)
 | 
			
		||||
 | 
			
		||||
char *
 | 
			
		||||
rc_proc_getent(const char *ent)
 | 
			
		||||
rc_proc_getent(const char *ent _unused)
 | 
			
		||||
{
 | 
			
		||||
#ifdef __linux__
 | 
			
		||||
	FILE *fp;
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,7 @@ const char librc_copyright[] = "Copyright (c) 2007-2008 Roy Marples";
 | 
			
		||||
 | 
			
		||||
#include "queue.h"
 | 
			
		||||
#include "librc.h"
 | 
			
		||||
#include <helpers.h>
 | 
			
		||||
#ifdef __FreeBSD__
 | 
			
		||||
#  include <sys/sysctl.h>
 | 
			
		||||
#endif
 | 
			
		||||
@@ -232,7 +233,7 @@ detect_prefix(const char *systype)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static const char *
 | 
			
		||||
detect_container(const char *systype)
 | 
			
		||||
detect_container(const char *systype _unused)
 | 
			
		||||
{
 | 
			
		||||
#ifdef __FreeBSD__
 | 
			
		||||
	if (systype) {
 | 
			
		||||
@@ -296,7 +297,7 @@ detect_container(const char *systype)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static const char *
 | 
			
		||||
detect_vm(const char *systype)
 | 
			
		||||
detect_vm(const char *systype _unused)
 | 
			
		||||
{
 | 
			
		||||
#ifdef __NetBSD__
 | 
			
		||||
	if (systype) {
 | 
			
		||||
 
 | 
			
		||||
@@ -46,6 +46,7 @@
 | 
			
		||||
#include "_usage.h"
 | 
			
		||||
 | 
			
		||||
const char *applet = NULL;
 | 
			
		||||
const char *procmounts = "/proc/mounts";
 | 
			
		||||
const char *extraopts = "[mount1] [mount2] ...";
 | 
			
		||||
const char *getoptstring = "f:F:n:N:o:O:p:P:iste:E:" getoptstring_COMMON;
 | 
			
		||||
const struct option longopts[] = {
 | 
			
		||||
@@ -323,7 +324,7 @@ find_mounts(struct args *args)
 | 
			
		||||
	int netdev;
 | 
			
		||||
	RC_STRINGLIST *list;
 | 
			
		||||
 | 
			
		||||
	if ((fp = fopen("/proc/self/mounts", "r")) == NULL)
 | 
			
		||||
	if ((fp = fopen(procmounts, "r")) == NULL)
 | 
			
		||||
		eerrorx("getmntinfo: %s", strerror(errno));
 | 
			
		||||
 | 
			
		||||
	list = rc_stringlist_new();
 | 
			
		||||
 
 | 
			
		||||
@@ -64,6 +64,7 @@ static struct pam_conv conv = { NULL, NULL};
 | 
			
		||||
#include "rc.h"
 | 
			
		||||
#include "rc-misc.h"
 | 
			
		||||
#include "_usage.h"
 | 
			
		||||
#include "helpers.h"
 | 
			
		||||
 | 
			
		||||
const char *applet = NULL;
 | 
			
		||||
const char *extraopts = NULL;
 | 
			
		||||
@@ -153,7 +154,9 @@ extern char **environ;
 | 
			
		||||
# define SYS_ioprio_set __NR_ioprio_set
 | 
			
		||||
#endif
 | 
			
		||||
#if !defined(__DragonFly__)
 | 
			
		||||
static inline int ioprio_set(int which, int who, int ioprio)
 | 
			
		||||
static inline int ioprio_set(int which _unused,
 | 
			
		||||
			     int who _unused,
 | 
			
		||||
			     int ioprio _unused)
 | 
			
		||||
{
 | 
			
		||||
#ifdef SYS_ioprio_set
 | 
			
		||||
	return syscall(SYS_ioprio_set, which, who, ioprio);
 | 
			
		||||
@@ -194,26 +197,45 @@ parse_signal(const char *sig)
 | 
			
		||||
		int signal;
 | 
			
		||||
	} SIGNALPAIR;
 | 
			
		||||
 | 
			
		||||
#define signalpair_item(name) { #name, SIG##name },
 | 
			
		||||
 | 
			
		||||
	static const SIGNALPAIR signallist[] = {
 | 
			
		||||
		{ "ABRT",	SIGABRT	},
 | 
			
		||||
		{ "ALRM",	SIGALRM	},
 | 
			
		||||
		{ "FPE",	SIGFPE	},
 | 
			
		||||
		{ "HUP",	SIGHUP	},
 | 
			
		||||
		{ "ILL",	SIGILL	},
 | 
			
		||||
		{ "INT",	SIGINT	},
 | 
			
		||||
		{ "KILL",	SIGKILL	},
 | 
			
		||||
		{ "PIPE",	SIGPIPE	},
 | 
			
		||||
		{ "QUIT",	SIGQUIT	},
 | 
			
		||||
		{ "SEGV",	SIGSEGV	},
 | 
			
		||||
		{ "TERM",	SIGTERM	},
 | 
			
		||||
		{ "USR1",	SIGUSR1	},
 | 
			
		||||
		{ "USR2",	SIGUSR2	},
 | 
			
		||||
		{ "CHLD",	SIGCHLD	},
 | 
			
		||||
		{ "CONT",	SIGCONT	},
 | 
			
		||||
		{ "STOP",	SIGSTOP	},
 | 
			
		||||
		{ "TSTP",	SIGTSTP	},
 | 
			
		||||
		{ "TTIN",	SIGTTIN	},
 | 
			
		||||
		{ "TTOU",	SIGTTOU	},
 | 
			
		||||
		signalpair_item(HUP)
 | 
			
		||||
		signalpair_item(INT)
 | 
			
		||||
		signalpair_item(QUIT)
 | 
			
		||||
		signalpair_item(ILL)
 | 
			
		||||
		signalpair_item(TRAP)
 | 
			
		||||
		signalpair_item(ABRT)
 | 
			
		||||
		signalpair_item(BUS)
 | 
			
		||||
		signalpair_item(FPE)
 | 
			
		||||
		signalpair_item(KILL)
 | 
			
		||||
		signalpair_item(USR1)
 | 
			
		||||
		signalpair_item(SEGV)
 | 
			
		||||
		signalpair_item(USR2)
 | 
			
		||||
		signalpair_item(PIPE)
 | 
			
		||||
		signalpair_item(ALRM)
 | 
			
		||||
		signalpair_item(TERM)
 | 
			
		||||
		signalpair_item(CHLD)
 | 
			
		||||
		signalpair_item(CONT)
 | 
			
		||||
		signalpair_item(STOP)
 | 
			
		||||
		signalpair_item(TSTP)
 | 
			
		||||
		signalpair_item(TTIN)
 | 
			
		||||
		signalpair_item(TTOU)
 | 
			
		||||
		signalpair_item(URG)
 | 
			
		||||
		signalpair_item(XCPU)
 | 
			
		||||
		signalpair_item(XFSZ)
 | 
			
		||||
		signalpair_item(VTALRM)
 | 
			
		||||
		signalpair_item(PROF)
 | 
			
		||||
#ifdef SIGWINCH
 | 
			
		||||
		signalpair_item(WINCH)
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef SIGIO
 | 
			
		||||
		signalpair_item(IO)
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef SIGPWR
 | 
			
		||||
		signalpair_item(PWR)
 | 
			
		||||
#endif
 | 
			
		||||
		signalpair_item(SYS)
 | 
			
		||||
		{ "NULL",	0 },
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
@@ -468,7 +490,7 @@ run_stop_schedule(const char *exec, const char *const *argv,
 | 
			
		||||
				if (tkilled == 0) {
 | 
			
		||||
					if (progressed)
 | 
			
		||||
						printf("\n");
 | 
			
		||||
						eerror("%s: no matching processes found", applet);
 | 
			
		||||
					eerror("%s: no matching processes found", applet);
 | 
			
		||||
				}
 | 
			
		||||
				return tkilled;
 | 
			
		||||
			}
 | 
			
		||||
@@ -696,17 +718,17 @@ int main(int argc, char **argv)
 | 
			
		||||
		if (sscanf(tmp, "%d", &nicelevel) != 1)
 | 
			
		||||
			eerror("%s: invalid nice level `%s' (SSD_NICELEVEL)",
 | 
			
		||||
			    applet, tmp);
 | 
			
		||||
		if ((tmp = getenv("SSD_IONICELEVEL"))) {
 | 
			
		||||
			int n = sscanf(tmp, "%d:%d", &ionicec, &ioniced);
 | 
			
		||||
			if (n != 1 && n != 2)
 | 
			
		||||
				eerror("%s: invalid ionice level `%s' (SSD_IONICELEVEL)",
 | 
			
		||||
				    applet, tmp);
 | 
			
		||||
			if (ionicec == 0)
 | 
			
		||||
				ioniced = 0;
 | 
			
		||||
			else if (ionicec == 3)
 | 
			
		||||
				ioniced = 7;
 | 
			
		||||
			ionicec <<= 13; /* class shift */
 | 
			
		||||
		}
 | 
			
		||||
	if ((tmp = getenv("SSD_IONICELEVEL"))) {
 | 
			
		||||
		int n = sscanf(tmp, "%d:%d", &ionicec, &ioniced);
 | 
			
		||||
		if (n != 1 && n != 2)
 | 
			
		||||
			eerror("%s: invalid ionice level `%s' (SSD_IONICELEVEL)",
 | 
			
		||||
			    applet, tmp);
 | 
			
		||||
		if (ionicec == 0)
 | 
			
		||||
			ioniced = 0;
 | 
			
		||||
		else if (ionicec == 3)
 | 
			
		||||
			ioniced = 7;
 | 
			
		||||
		ionicec <<= 13; /* class shift */
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* Get our user name and initial dir */
 | 
			
		||||
	p = getenv("USER");
 | 
			
		||||
 
 | 
			
		||||
@@ -62,6 +62,7 @@ static struct pam_conv conv = { NULL, NULL};
 | 
			
		||||
#include "rc.h"
 | 
			
		||||
#include "rc-misc.h"
 | 
			
		||||
#include "_usage.h"
 | 
			
		||||
#include "helpers.h"
 | 
			
		||||
 | 
			
		||||
const char *applet = NULL;
 | 
			
		||||
const char *extraopts = NULL;
 | 
			
		||||
@@ -124,7 +125,8 @@ extern char **environ;
 | 
			
		||||
# define SYS_ioprio_set __NR_ioprio_set
 | 
			
		||||
#endif
 | 
			
		||||
#if !defined(__DragonFly__)
 | 
			
		||||
static inline int ioprio_set(int which, int who, int ioprio)
 | 
			
		||||
static inline int ioprio_set(int which _unused, int who _unused,
 | 
			
		||||
			     int ioprio _unused)
 | 
			
		||||
{
 | 
			
		||||
#ifdef SYS_ioprio_set
 | 
			
		||||
	return syscall(SYS_ioprio_set, which, who, ioprio);
 | 
			
		||||
@@ -662,7 +664,7 @@ int main(int argc, char **argv)
 | 
			
		||||
	fp = fopen(pidfile, "w");
 | 
			
		||||
	if (! fp)
 | 
			
		||||
		eerrorx("%s: fopen `%s': %s", applet, pidfile, strerror(errno));
 | 
			
		||||
		fclose(fp);
 | 
			
		||||
	fclose(fp);
 | 
			
		||||
 | 
			
		||||
	child_pid = fork();
 | 
			
		||||
	if (child_pid == -1)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user