Compare commits
	
		
			15 Commits
		
	
	
		
			0.33.1
			...
			openrc-0.1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					0853c110e5 | ||
| 
						 | 
					1a43ce11d0 | ||
| 
						 | 
					46e504b403 | ||
| 
						 | 
					fc1f3d14f4 | ||
| 
						 | 
					b8a016aaba | ||
| 
						 | 
					63f5256b59 | ||
| 
						 | 
					c420f56856 | ||
| 
						 | 
					5b0f323da9 | ||
| 
						 | 
					d86853538a | ||
| 
						 | 
					f2c0e700c6 | ||
| 
						 | 
					b1de9d7324 | ||
| 
						 | 
					5b4886d23e | ||
| 
						 | 
					2a53efbc07 | ||
| 
						 | 
					a530722f65 | ||
| 
						 | 
					661e9cf002 | 
@@ -1,3 +1,3 @@
 | 
			
		||||
NAME=		openrc
 | 
			
		||||
VERSION=	0.12
 | 
			
		||||
VERSION=	0.12.4
 | 
			
		||||
PKG=		${NAME}-${VERSION}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								etc/rc.conf.GNU-kFreeBSD
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								etc/rc.conf.GNU-kFreeBSD
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
##############################################################################
 | 
			
		||||
# GNU/kFreeBSD SPECIFIC OPTIONS
 | 
			
		||||
 | 
			
		||||
# This is the subsystem type. Valid options on GNU/kFreeBSD:
 | 
			
		||||
# ""        - nothing special
 | 
			
		||||
# "jail"    - FreeBSD jails (not yet implemented)
 | 
			
		||||
# If this is commented out, automatic detection will be used.
 | 
			
		||||
#
 | 
			
		||||
# This should be set to the value representing the environment this file is
 | 
			
		||||
# PRESENTLY in, not the virtualization the environment is capable of.
 | 
			
		||||
#rc_sys=""
 | 
			
		||||
@@ -117,6 +117,7 @@ migrate_to_run()
 | 
			
		||||
 | 
			
		||||
clean_run()
 | 
			
		||||
{
 | 
			
		||||
	[ "$RC_SYS" = VSERVER ] && return 0
 | 
			
		||||
	local dir
 | 
			
		||||
	dir=$(mktemp -d)
 | 
			
		||||
	mount --bind / $dir
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ _IFS="
 | 
			
		||||
depend()
 | 
			
		||||
{
 | 
			
		||||
	use dev clock modules
 | 
			
		||||
	keyword -jail -openvz -prefix -timeout -vserver -lxc
 | 
			
		||||
	keyword -jail -openvz -prefix -timeout -vserver -lxc -uml
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
_abort() {
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ depend()
 | 
			
		||||
	need fsck
 | 
			
		||||
	use lvm modules mtab
 | 
			
		||||
	after lvm modules
 | 
			
		||||
	keyword -jail -openvz -prefix -vserver -lxc
 | 
			
		||||
	keyword -jail -prefix -vserver -lxc
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start()
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@ description="Configures the loopback interface."
 | 
			
		||||
 | 
			
		||||
depend()
 | 
			
		||||
{
 | 
			
		||||
	return 0
 | 
			
		||||
	keyword -jail -prefix -vserver
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start()
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@ depend()
 | 
			
		||||
	config /etc/fstab
 | 
			
		||||
	use afc-client amd autofs openvpn
 | 
			
		||||
	use dns
 | 
			
		||||
	keyword -jail -prefix -vserver
 | 
			
		||||
	keyword -jail -prefix -vserver -lxc
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start()
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								mk/os-GNU-kFreeBSD.mk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								mk/os-GNU-kFreeBSD.mk
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
# Copyright (c) 2008 Roy Marples <roy@marples.name>
 | 
			
		||||
# Released under the 2-clause BSD license.
 | 
			
		||||
 | 
			
		||||
# Generic definitions
 | 
			
		||||
 | 
			
		||||
CPPFLAGS+=	-D_BSD_SOURCE -D_XOPEN_SOURCE=700
 | 
			
		||||
LIBDL=		-Wl,-Bdynamic -ldl
 | 
			
		||||
LIBKVM?=
 | 
			
		||||
include ${MK}/os-BSD.mk
 | 
			
		||||
							
								
								
									
										2
									
								
								mk/os.mk
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								mk/os.mk
									
									
									
									
									
								
							@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
# Generic definitions
 | 
			
		||||
 | 
			
		||||
_OS_SH=		uname -s
 | 
			
		||||
_OS_SH=		uname -s | tr '/' '-'
 | 
			
		||||
_OS:= 		$(shell ${_OS_SH})
 | 
			
		||||
OS?= 		${_OS}
 | 
			
		||||
include ${MK}/os-${OS}.mk
 | 
			
		||||
 
 | 
			
		||||
@@ -116,7 +116,7 @@ cgroup_set_limits()
 | 
			
		||||
 | 
			
		||||
cgroup_cleanup()
 | 
			
		||||
{
 | 
			
		||||
	yesno "${rc_cgroup_cleanup:-no}" && cgroup_running || return 0
 | 
			
		||||
	cgroup_running || return 0
 | 
			
		||||
	ebegin "starting cgroups cleanup"
 | 
			
		||||
	for sig in TERM QUIT INT; do
 | 
			
		||||
		cgroup_get_pids || { eend 0 "finished" ; return 0 ; }
 | 
			
		||||
 
 | 
			
		||||
@@ -308,6 +308,7 @@ while [ -n "$1" ]; do
 | 
			
		||||
				fi
 | 
			
		||||
				[ "$(command -v cgroup_cleanup)" = "cgroup_cleanup" -a \
 | 
			
		||||
				"$1" = "stop" ] && \
 | 
			
		||||
				yesno "${rc_cgroup_cleanup}" && \
 | 
			
		||||
					cgroup_cleanup
 | 
			
		||||
				shift
 | 
			
		||||
				continue 2
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@
 | 
			
		||||
 | 
			
		||||
#include "librc.h"
 | 
			
		||||
 | 
			
		||||
#if defined(__linux__)
 | 
			
		||||
#if defined(__linux__) || defined (__GLIBC__)
 | 
			
		||||
static bool
 | 
			
		||||
pid_is_exec(pid_t pid, const char *exec)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -856,7 +856,7 @@ rc_deptree_update(void)
 | 
			
		||||
	 * work for them. This doesn't stop them from being run directly. */
 | 
			
		||||
	if (sys) {
 | 
			
		||||
		len = strlen(sys);
 | 
			
		||||
		nosys = xmalloc(len + 1);
 | 
			
		||||
		nosys = xmalloc(len + 2);
 | 
			
		||||
		nosys[0] = '-';
 | 
			
		||||
		for (i = 0; i < len; i++)
 | 
			
		||||
			nosys[i + 1] = (char)tolower((unsigned char)sys[i]);
 | 
			
		||||
 
 | 
			
		||||
@@ -193,7 +193,7 @@ file_regex(const char *file, const char *regex)
 | 
			
		||||
			str += strlen(str) + 1;
 | 
			
		||||
			/* len is the size of allocated buffer and we don't
 | 
			
		||||
			   want call regexec BUFSIZE times. find next str */
 | 
			
		||||
			while (*str == '\0' && str < line + len)
 | 
			
		||||
			while (str < line + len && *str == '\0')
 | 
			
		||||
				str++;
 | 
			
		||||
		} while (str < line + len);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,7 @@
 | 
			
		||||
#  include <sys/statvfs.h>
 | 
			
		||||
#  define statfs statvfs
 | 
			
		||||
#  define F_FLAGS f_flag
 | 
			
		||||
#elif defined (__linux__)
 | 
			
		||||
#elif defined (__linux__) || defined (__GLIBC__)
 | 
			
		||||
#  include <mntent.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -265,7 +265,7 @@ find_mounts(struct args *args)
 | 
			
		||||
	return list;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#elif defined (__linux__)
 | 
			
		||||
#elif defined (__linux__) || defined (__GLIBC__)
 | 
			
		||||
static struct mntent *
 | 
			
		||||
getmntfile(const char *file)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -44,7 +44,7 @@
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
 | 
			
		||||
#ifdef __linux__
 | 
			
		||||
#if defined(__linux__) || defined(__GLIBC__)
 | 
			
		||||
#  include <pty.h>
 | 
			
		||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
 | 
			
		||||
#  include <util.h>
 | 
			
		||||
 
 | 
			
		||||
@@ -52,7 +52,7 @@
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
 | 
			
		||||
#ifdef __linux__
 | 
			
		||||
#if defined(__linux__) || defined(__GLIBC__)
 | 
			
		||||
#  include <pty.h>
 | 
			
		||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
 | 
			
		||||
#  include <util.h>
 | 
			
		||||
 
 | 
			
		||||
@@ -316,14 +316,12 @@ get_pid(const char *pidfile, bool quiet)
 | 
			
		||||
		return -1;
 | 
			
		||||
 | 
			
		||||
	if ((fp = fopen(pidfile, "r")) == NULL) {
 | 
			
		||||
		if (!quiet)
 | 
			
		||||
			eerror("%s: fopen `%s': %s", applet, pidfile, strerror(errno));
 | 
			
		||||
		ewarnv("%s: fopen `%s': %s", applet, pidfile, strerror(errno));
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (fscanf(fp, "%d", &pid) != 1) {
 | 
			
		||||
		if (!quiet)
 | 
			
		||||
			eerror("%s: no pid found in `%s'", applet, pidfile);
 | 
			
		||||
		ewarnv("%s: no pid found in `%s'", applet, pidfile);
 | 
			
		||||
		fclose(fp);
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
@@ -461,7 +459,7 @@ run_stop_schedule(const char *exec, const char *const *argv,
 | 
			
		||||
				{
 | 
			
		||||
					if ((nrunning = do_stop(exec, argv,
 | 
			
		||||
						    pid, uid, 0, true, false,
 | 
			
		||||
						    true)) == 0)
 | 
			
		||||
	test)) == 0)
 | 
			
		||||
						return 0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -1088,7 +1086,7 @@ start_stop_daemon(int argc, char **argv)
 | 
			
		||||
		pid = 0;
 | 
			
		||||
 | 
			
		||||
	if (do_stop(exec, (const char * const *)margv, pid, uid,
 | 
			
		||||
		0, true, false, true) > 0)
 | 
			
		||||
		0, true, false, test) > 0)
 | 
			
		||||
		eerrorx("%s: %s is already running", applet, exec);
 | 
			
		||||
 | 
			
		||||
	if (test) {
 | 
			
		||||
@@ -1366,7 +1364,7 @@ start_stop_daemon(int argc, char **argv)
 | 
			
		||||
			} else
 | 
			
		||||
				pid = 0;
 | 
			
		||||
			if (do_stop(exec, (const char *const *)margv,
 | 
			
		||||
				pid, uid, 0, true, false, true) > 0)
 | 
			
		||||
				pid, uid, 0, true, false, test) > 0)
 | 
			
		||||
				alive = true;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user