Compare commits
	
		
			12 Commits
		
	
	
		
			openrc-0.1
			...
			funtoo-ope
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 6b78f4c8e0 | ||
|   | e8b4dc22cb | ||
|   | 5fb4b03366 | ||
|   | 76581025ea | ||
|   | a559af4ff9 | ||
|   | 35fe25ab06 | ||
|   | a2e4cb2f89 | ||
|   | 0490a83134 | ||
|   | 0853c110e5 | ||
|   | 1a43ce11d0 | ||
|   | 46e504b403 | ||
|   | fc1f3d14f4 | 
| @@ -1,3 +1,3 @@ | ||||
| NAME=		openrc | ||||
| VERSION=	0.12.3 | ||||
| VERSION=	0.12.4 | ||||
| PKG=		${NAME}-${VERSION} | ||||
|   | ||||
| @@ -1,2 +1,15 @@ | ||||
| # Set to the hostname of this machine | ||||
| # Set to the fully qualified domain name (e.g. "mybox.example.com") of | ||||
| # this machine, if it has one, otherwise set to the machine name | ||||
| # (e.g. "mybox"). | ||||
| hostname="localhost" | ||||
|  | ||||
| # Set to the NIS domain name of this machine, if it has one, otherwise | ||||
| # leave commented out. | ||||
| #nisdomainname="localdomain.com" | ||||
|  | ||||
| # Set other alias-to-address mappings, if needed, otherwise leave | ||||
| # commented out. | ||||
| #aliases="127.0.0.1 mybox | ||||
| #10.0.0.1	mylaptop | ||||
| #172.16.0.1	myserver | ||||
| #192.168.0.1	myworkstation" | ||||
|   | ||||
							
								
								
									
										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="" | ||||
| @@ -1,7 +1,7 @@ | ||||
| include ../mk/net.mk | ||||
|  | ||||
| DIR=	${INITDIR} | ||||
| SRCS=	bootmisc.in fsck.in hostname.in local.in localmount.in loopback.in \ | ||||
| SRCS=	bootmisc.in fsck.in hostname.in local.in localmount.in \ | ||||
| 	netmount.in root.in savecache.in swap.in swapfiles.in \ | ||||
| 	tmpfiles.setup.in swclock.in sysctl.in urandom.in ${SRCS-${OS}} | ||||
| BIN=	${OBJS} | ||||
|   | ||||
| @@ -117,6 +117,7 @@ migrate_to_run() | ||||
|  | ||||
| clean_run() | ||||
| { | ||||
| 	[ "$RC_SYS" = VSERVER ] && return 0 | ||||
| 	local dir | ||||
| 	dir=$(mktemp -d) | ||||
| 	mount --bind / $dir | ||||
|   | ||||
| @@ -1,18 +1,57 @@ | ||||
| #!@SBINDIR@/runscript | ||||
| #!@PREFIX@/sbin/runscript | ||||
| # Copyright (c) 2007-2009 Roy Marples <roy@marples.name> | ||||
| # Released under the 2-clause BSD license. | ||||
|  | ||||
| description="Sets the hostname of the machine." | ||||
|  | ||||
| depend() { | ||||
| 	keyword -prefix -lxc | ||||
| 	need root | ||||
| } | ||||
|  | ||||
| start() | ||||
| { | ||||
| 	# HOSTNAME variable used to be defined in caps in conf.d/hostname. | ||||
| 	# It is also a magic variable in bash. | ||||
| 	hostname=${hostname-${HOSTNAME-localhost}} # checkbashisms: false positive | ||||
| 	hostname=${hostname-${HOSTNAME-localhost}} | ||||
| 	out=$hostname | ||||
| 	short=${hostname%%.*} | ||||
| 	if [ "$short" != "$hostname" ]; then | ||||
| 		out="$out $short" | ||||
| 	fi | ||||
| 	if [ "$nisdomainname" != "" ]; then | ||||
| 		ebegin "Setting NIS domain name to $nisdomainname" | ||||
| 		nisdomainname $nisdomainname | ||||
| 		eend $? "Failed to set the NIS domain name" | ||||
| 	fi | ||||
| 	if [ "$short" != "localhost" ]; then | ||||
| 		out="$out localhost" | ||||
| 	fi | ||||
| 	if [ "$hostname" != "localhost.localdomain" ]; then | ||||
| 		out="$out localhost.localdomain" | ||||
| 	fi | ||||
| 	[ -n "$aliases" ] && out2="$aliases" | ||||
| 	ebegin "Configuring /etc/hosts" | ||||
| 	cat << END > /etc/hosts | ||||
| # Local Host Database | ||||
| # | ||||
| # This AUTOMATICALLY-GENERATED file describes a number of aliases-to-address | ||||
| # mappings for the local hosts that share this file. | ||||
| # | ||||
| # In the presence of the domain name service or NIS, this file may not be | ||||
| # consulted at all; see /etc/host.conf for the resolution order. | ||||
| # | ||||
| # DO NOT EDIT THIS FILE BY HAND; YOUR CHANGES WILL BE OVERWRITTEN | ||||
| # | ||||
| # Define alias-to-address mappings in /etc/conf.d/hostname | ||||
|  | ||||
| # IPv4 and IPv6 localhost aliases | ||||
| 127.0.0.1	$out | ||||
| ::1		$out | ||||
|  | ||||
| # Other aliases | ||||
| $out2 | ||||
| END | ||||
| 	chmod 0644 /etc/hosts | ||||
| 	eend $? | ||||
| 	[ "$RC_SYS" = "LXC" ] && return 0 | ||||
| 	ebegin "Setting hostname to $hostname" | ||||
| 	hostname "$hostname" | ||||
| 	eend $? "Failed to set the hostname" | ||||
|   | ||||
| @@ -1,35 +0,0 @@ | ||||
| #!@SBINDIR@/runscript | ||||
| # Copyright (c) 2013 William Hubbs <w.d.hubbs@gmail.com> | ||||
| # Released under the 2-clause BSD license. | ||||
|  | ||||
| description="Configures the loopback interface." | ||||
|  | ||||
| depend() | ||||
| { | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| start() | ||||
| { | ||||
| 	if [ "$RC_UNAME" = Linux ]; then | ||||
| 		ebegin "Bringing up network interface lo" | ||||
| 		if type ip > /dev/null 2>&1; then | ||||
| 			ip addr add 127.0.0.1/8 dev lo brd + scope host | ||||
| 			ip route add 127.0.0.0/8 dev lo scope host | ||||
| 			ip link set lo up | ||||
| 		else | ||||
| 			ifconfig lo 127.0.0.1 netmask 255.0.0.0 | ||||
| 			route add -net 127.0.0.0 netmask 255.0.0.0 gw 127.0.0.1 | ||||
| 		fi | ||||
| 	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 $? | ||||
| } | ||||
|  | ||||
| stop() | ||||
| { | ||||
| 	return 0 | ||||
| } | ||||
| @@ -1,11 +1,11 @@ | ||||
| #!@SBINDIR@/runscript | ||||
| #!@PREFIX@/sbin/runscript | ||||
| # Copyright (c) 2007-2008 Roy Marples <roy@marples.name> | ||||
| # Released under the 2-clause BSD license. | ||||
|  | ||||
| depend() | ||||
| { | ||||
| 	before bootmisc logger | ||||
| 	keyword -lxc -prefix -vserver | ||||
| 	keyword -lxc -vserver | ||||
| } | ||||
|  | ||||
| start() | ||||
| @@ -15,6 +15,14 @@ start() | ||||
| 	ebegin "Configuring kernel parameters" | ||||
| 	eindent | ||||
|  | ||||
| 	# default sysctl System V max shared memory to 1/4 of RAM: | ||||
| 	mem_bytes=`awk '/MemTotal:/ { printf "%0.f",$2 * 1024}' /proc/meminfo` | ||||
| 	mem_max=`expr $mem_bytes / 4` | ||||
| 	page_size=`getconf PAGE_SIZE` | ||||
| 	shmall=`expr $mem_bytes / $page_size` | ||||
| 	sysctl kernel.shmmax=$mem_max > /dev/null | ||||
| 	sysctl kernel.shmall=$shmall > /dev/null | ||||
|  | ||||
| 	for conf in @SYSCONFDIR@/sysctl.conf @SYSCONFDIR@/sysctl.d/*.conf; do | ||||
| 		if [ -r "$conf" ]; then | ||||
| 			vebegin "applying $conf" | ||||
|   | ||||
							
								
								
									
										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 | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| include ../mk/net.mk | ||||
|  | ||||
| BOOT=		bootmisc fsck hostname localmount loopback \ | ||||
| BOOT=		bootmisc fsck hostname localmount \ | ||||
| 		root swap swapfiles sysctl urandom ${BOOT-${OS}} | ||||
| DEFAULT=	local netmount | ||||
| SHUTDOWN=	savecache ${SHUTDOWN-${OS}} | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user