Compare commits
	
		
			18 Commits
		
	
	
		
			0.40.2
			...
			openrc-0.1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					8046427d7f | ||
| 
						 | 
					c73173ae53 | ||
| 
						 | 
					2964fc47f1 | ||
| 
						 | 
					0396f0ea7c | ||
| 
						 | 
					78a25883f3 | ||
| 
						 | 
					18dc0efa52 | ||
| 
						 | 
					f53645b7c7 | ||
| 
						 | 
					a75a9940b0 | ||
| 
						 | 
					e27f0acc60 | ||
| 
						 | 
					5c8ba80ea7 | ||
| 
						 | 
					e8ad6d2423 | ||
| 
						 | 
					aa34435cc8 | ||
| 
						 | 
					68f8e8aac2 | ||
| 
						 | 
					ee54bfef05 | ||
| 
						 | 
					7279b469ec | ||
| 
						 | 
					8482008559 | ||
| 
						 | 
					463d4ef00a | ||
| 
						 | 
					b5629d4ea0 | 
@@ -1,3 +1,3 @@
 | 
			
		||||
NAME=		openrc
 | 
			
		||||
VERSION=	0.11
 | 
			
		||||
VERSION=	0.11.3
 | 
			
		||||
PKG=		${NAME}-${VERSION}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
DIR=	${CONFDIR}
 | 
			
		||||
CONF=	bootmisc fsck hostname localmount urandom tmpfilesd ${CONF-${OS}}
 | 
			
		||||
CONF=	bootmisc fsck hostname localmount netmount urandom tmpfiles \
 | 
			
		||||
		${CONF-${OS}}
 | 
			
		||||
 | 
			
		||||
ifeq (${MKNET},)
 | 
			
		||||
CONF+= network staticroute
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								conf.d/netmount
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								conf.d/netmount
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
# Depending on how mounting your network file systems behaves when your
 | 
			
		||||
# network interfaces are down, you may need to set the netmount script to
 | 
			
		||||
# require  specific network interfaces to be active. This file gives
 | 
			
		||||
# examples of how to do this:
 | 
			
		||||
#
 | 
			
		||||
# If you are using newnet and configuring the interface with a static
 | 
			
		||||
# address with the network script:
 | 
			
		||||
# rc_need="network"
 | 
			
		||||
#
 | 
			
		||||
# If you are using oldnet, you must list the specific net.* services you
 | 
			
		||||
# need:
 | 
			
		||||
#
 | 
			
		||||
# rc_need="net.eth0"
 | 
			
		||||
# rc_need="net.eth1 net.eth2"
 | 
			
		||||
#
 | 
			
		||||
# If you are using a dynamic network management tool like
 | 
			
		||||
# networkmanager, dhcpcd, etc, you should list that tool here.
 | 
			
		||||
#
 | 
			
		||||
# rc_need="networkmanager"
 | 
			
		||||
# rc_need="dhcpcd"
 | 
			
		||||
@@ -80,9 +80,9 @@
 | 
			
		||||
# Most drivers that report carrier status function correctly, but some do not
 | 
			
		||||
# One of these faulty drivers is for the Intel e1000 network card, but only
 | 
			
		||||
# at boot time. To get around this you may alter the carrier_timeout value for
 | 
			
		||||
# the interface. -1 is disable, 0 is infinite and any other number of seconds
 | 
			
		||||
# is how long we wait for carrier. The current default is 3 seconds
 | 
			
		||||
#carrier_timeout_eth0=-1
 | 
			
		||||
# the interface. 0 is disable and any other number of seconds is how
 | 
			
		||||
# long we wait for carrier. The current default is disabled.
 | 
			
		||||
#carrier_timeout_eth0=0
 | 
			
		||||
 | 
			
		||||
# You may wish to disable the interface being brought down when stopping.
 | 
			
		||||
# This is only of use for WakeOnLan.
 | 
			
		||||
 
 | 
			
		||||
@@ -126,6 +126,13 @@
 | 
			
		||||
# tables you may have to set a global metric as the due to a simple read of
 | 
			
		||||
# the routing table taking over a minute at a time.
 | 
			
		||||
 | 
			
		||||
# Most drivers that report carrier status function correctly, but some do not
 | 
			
		||||
# One of these faulty drivers is for the Intel e1000 network card, but only
 | 
			
		||||
# at boot time. To get around this you may alter the carrier_timeout value for
 | 
			
		||||
# the interface. 0 is disable and any other number of seconds is how
 | 
			
		||||
# long we wait for carrier. The current default is disabled.
 | 
			
		||||
#carrier_timeout_eth0=0
 | 
			
		||||
 | 
			
		||||
# You may wish to disable the interface being brought down when stopping.
 | 
			
		||||
# This is only of use for WakeOnLan.
 | 
			
		||||
#ifdown_eth0="NO"
 | 
			
		||||
 
 | 
			
		||||
@@ -94,6 +94,10 @@
 | 
			
		||||
# These variables are documented here, but should be configured in
 | 
			
		||||
# /etc/conf.d/foo for service foo and NOT enabled here unless you
 | 
			
		||||
# really want them to work on a global basis.
 | 
			
		||||
# If your service has characters in its name which are not legal in
 | 
			
		||||
# shell variable names and you configure the variables for it in this
 | 
			
		||||
# file, those characters should be replaced with underscores in the
 | 
			
		||||
# variable names as shown below.
 | 
			
		||||
 | 
			
		||||
# Some daemons are started and stopped via start-stop-daemon.
 | 
			
		||||
# We can set some things on a per service basis, like the nicelevel.
 | 
			
		||||
@@ -116,6 +120,13 @@
 | 
			
		||||
#rc_foo_need="openvpn"
 | 
			
		||||
#rc_foo_after="clock"
 | 
			
		||||
 | 
			
		||||
# Below is an example for service foo-bar. Note that the '-' is illegal
 | 
			
		||||
# in a shell variable name, so we convert it to an underscore.
 | 
			
		||||
# example for service foo-bar.
 | 
			
		||||
#rc_foo_bar_config="/etc/foo-bar"
 | 
			
		||||
#rc_foo_bar_need="openvpn"
 | 
			
		||||
#rc_foo_bar_after="clock"
 | 
			
		||||
 | 
			
		||||
# You can also remove dependencies.
 | 
			
		||||
# This is mainly used for saying which servies do NOT provide net.
 | 
			
		||||
#rc_net_tap0_provide="!net"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								init.d/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								init.d/.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -41,5 +41,4 @@ syslogd
 | 
			
		||||
termencoding
 | 
			
		||||
ttys
 | 
			
		||||
wscons
 | 
			
		||||
tmpfilesd.boot
 | 
			
		||||
tmpfilesd.sysinit
 | 
			
		||||
tmpfiles.setup
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,7 @@
 | 
			
		||||
DIR=	${INITDIR}
 | 
			
		||||
SRCS=	bootmisc.in fsck.in hostname.in local.in localmount.in netmount.in \
 | 
			
		||||
	root.in savecache.in swap.in swapfiles.in \
 | 
			
		||||
	tmpfilesd.boot.in tmpfilesd.sysinit.in \
 | 
			
		||||
	swclock.in sysctl.in urandom.in ${SRCS-${OS}}
 | 
			
		||||
	tmpfiles.setup.in swclock.in sysctl.in urandom.in ${SRCS-${OS}}
 | 
			
		||||
BIN=	${OBJS}
 | 
			
		||||
 | 
			
		||||
# Build our old net foo or not
 | 
			
		||||
 
 | 
			
		||||
@@ -5,8 +5,8 @@
 | 
			
		||||
description="Mount system critical filesystems in /dev."
 | 
			
		||||
 | 
			
		||||
depend() {
 | 
			
		||||
	use dev-mount udev-mount
 | 
			
		||||
	before udev mdev
 | 
			
		||||
	use dev-mount
 | 
			
		||||
	before dev
 | 
			
		||||
	keyword -prefix -vserver
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -108,7 +108,7 @@ _wait_for_carrier()
 | 
			
		||||
	_has_carrier  && return 0
 | 
			
		||||
 | 
			
		||||
	eval timeout=\$carrier_timeout_${IFVAR}
 | 
			
		||||
	timeout=${timeout:-${carrier_timeout:-5}}
 | 
			
		||||
	timeout=${timeout:-${carrier_timeout:-0}}
 | 
			
		||||
 | 
			
		||||
	# Incase users don't want this nice feature ...
 | 
			
		||||
	[ ${timeout} -le 0 ] && return 0
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,6 @@ description="Mounts network shares, other than NFS, according to /etc/fstab."
 | 
			
		||||
depend()
 | 
			
		||||
{
 | 
			
		||||
	config /etc/fstab
 | 
			
		||||
	need net
 | 
			
		||||
	use afc-client amd autofs openvpn
 | 
			
		||||
	use dns
 | 
			
		||||
	keyword -jail -prefix -vserver
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
# Copyright 1999-2012 Gentoo Foundation
 | 
			
		||||
# Released under the 2-clause BSD license.
 | 
			
		||||
 | 
			
		||||
description="Create tmpfiles.d entries (boot)"
 | 
			
		||||
description="set up tmpfiles.d entries"
 | 
			
		||||
 | 
			
		||||
depend()
 | 
			
		||||
{
 | 
			
		||||
@@ -11,8 +11,8 @@ depend()
 | 
			
		||||
 | 
			
		||||
start()
 | 
			
		||||
{
 | 
			
		||||
	ebegin "${description/Create/Creating}"
 | 
			
		||||
	@LIBEXECDIR@/sh/tmpfiles.sh --create ${tmpfiles_opts}
 | 
			
		||||
	ebegin "setting up tmpfiles.d entries"
 | 
			
		||||
	@LIBEXECDIR@/sh/tmpfiles.sh --create --remove ${tmpfiles_opts}
 | 
			
		||||
	eend $?
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
@@ -1,20 +0,0 @@
 | 
			
		||||
#!@PREFIX@/sbin/runscript
 | 
			
		||||
# Copyright 1999-2012 Gentoo Foundation
 | 
			
		||||
# Released under the 2-clause BSD license.
 | 
			
		||||
 | 
			
		||||
description="Create tmpfiles.d entries (sysinit)"
 | 
			
		||||
 | 
			
		||||
depend()
 | 
			
		||||
{
 | 
			
		||||
	# Convert to 'need dev' when the new udev is ready, for OpenRC 0.11
 | 
			
		||||
	#need dev-mount
 | 
			
		||||
	need dev
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start()
 | 
			
		||||
{
 | 
			
		||||
	ebegin "${description/Create/Creating}"
 | 
			
		||||
	@LIBEXECDIR@/sh/tmpfiles.sh --create ${tmpfiles_opts}
 | 
			
		||||
	eend $?
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
@@ -46,7 +46,7 @@ Show all runlevels and their services.
 | 
			
		||||
List all services that have crashed.
 | 
			
		||||
.It Fl l , -list
 | 
			
		||||
List all defined runlevels.
 | 
			
		||||
.It fl r , -runlevel
 | 
			
		||||
.It Fl r , -runlevel
 | 
			
		||||
Print the current runlevel name.
 | 
			
		||||
.It Fl s , -servicelist
 | 
			
		||||
Show all services.
 | 
			
		||||
 
 | 
			
		||||
@@ -38,9 +38,9 @@ BOOT-FreeBSD+=	hostid newsyslog savecore syslogd
 | 
			
		||||
# FreeBSD specific stuff
 | 
			
		||||
BOOT-FreeBSD+=	adjkerntz dumpon syscons
 | 
			
		||||
 | 
			
		||||
BOOT-Linux+=	hwclock keymaps modules mtab procfs termencoding tmpfilesd.boot
 | 
			
		||||
BOOT-Linux+=	hwclock keymaps modules mtab procfs termencoding tmpfiles.setup
 | 
			
		||||
SHUTDOWN-Linux=	killprocs mount-ro
 | 
			
		||||
SYSINIT-Linux=	devfs dmesg sysfs tmpfilesd.sysinit
 | 
			
		||||
SYSINIT-Linux=	devfs dmesg sysfs
 | 
			
		||||
 | 
			
		||||
# Generic BSD stuff
 | 
			
		||||
BOOT-NetBSD+=	hostid newsyslog savecore syslogd
 | 
			
		||||
 
 | 
			
		||||
@@ -61,7 +61,7 @@ _f() {
 | 
			
		||||
 | 
			
		||||
	if [ ! -e "$path" ]; then
 | 
			
		||||
		dryrun_or_real install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path"
 | 
			
		||||
		[ -n "$arg" ] && _w "$@"
 | 
			
		||||
		[ -z "$arg" ] || _w "$@"
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -72,7 +72,7 @@ _F() {
 | 
			
		||||
	[ $CREATE -gt 0 ] || return 0
 | 
			
		||||
 | 
			
		||||
	dryrun_or_real install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path"
 | 
			
		||||
	[ -n "$arg" ] && _w "$@"
 | 
			
		||||
	[ -z "$arg" ] || _w "$@"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
_d() {
 | 
			
		||||
@@ -201,6 +201,7 @@ tmpfiles_d=''
 | 
			
		||||
# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
 | 
			
		||||
for d in ${tmpfiles_dirs} ; do
 | 
			
		||||
	[ -d $d ] && for f in ${d}/*.conf ; do
 | 
			
		||||
		[ "$f" = "$d/systemd.conf" ] && continue
 | 
			
		||||
		[ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
 | 
			
		||||
	done # for f in ${d}
 | 
			
		||||
done # for d in ${tmpfiles_dirs}
 | 
			
		||||
@@ -252,46 +253,34 @@ for FILE in $tmpfiles_d ; do
 | 
			
		||||
 | 
			
		||||
	# XXX: Upstream says whitespace is NOT permitted in the Path argument.
 | 
			
		||||
	# But IS allowed when globs are expanded for the x/r/R/z/Z types.
 | 
			
		||||
	while read line; do
 | 
			
		||||
	while read cmd path mode uid gid age arg; do
 | 
			
		||||
		LINENUM=$(( LINENUM+1 ))
 | 
			
		||||
 | 
			
		||||
		# This will skip over comments and empty lines
 | 
			
		||||
		set -- $line
 | 
			
		||||
 | 
			
		||||
		# Unless we have both command and path, skip this line.
 | 
			
		||||
		if [ -z "$1" -o -z "$2" ]; then
 | 
			
		||||
		if [ -z "$cmd" -o -z "$path" ]; then
 | 
			
		||||
			continue
 | 
			
		||||
		fi
 | 
			
		||||
 | 
			
		||||
		# whine about invalid entries
 | 
			
		||||
		case $1 in
 | 
			
		||||
		case $cmd in
 | 
			
		||||
			f|F|w|d|D|p|L|c|b|x|r|R|z|Z) ;;
 | 
			
		||||
			\#) continue ;;
 | 
			
		||||
			*) warninvalid ; continue ;;
 | 
			
		||||
		esac
 | 
			
		||||
 | 
			
		||||
		cmd=$1
 | 
			
		||||
		path=$2
 | 
			
		||||
 | 
			
		||||
		# fall back on defaults when parameters are passed as '-'
 | 
			
		||||
		if [ "$3" = '-' -o "$3" = '' ]; then
 | 
			
		||||
			case ${1} in
 | 
			
		||||
		if [ "$mode" = '-' -o "$mode" = '' ]; then
 | 
			
		||||
			case "$cmd" in
 | 
			
		||||
				p|f|F) mode=0644 ;;
 | 
			
		||||
				d|D) mode=0755 ;;
 | 
			
		||||
				z|Z|x|r|R|L) ;;
 | 
			
		||||
			esac
 | 
			
		||||
		else
 | 
			
		||||
			mode=$3
 | 
			
		||||
		fi
 | 
			
		||||
		uid=$4
 | 
			
		||||
		gid=$5
 | 
			
		||||
		age=$6
 | 
			
		||||
		arg=$7
 | 
			
		||||
 | 
			
		||||
		[ "${4}" = '-' -o "${4}" = '' ] && uid=0
 | 
			
		||||
		[ "${5}" = '-' -o "${5}" = '' ] && gid=0
 | 
			
		||||
		[ "${6}" = '-' -o "${6}" = '' ] && age=0
 | 
			
		||||
		[ "${7}" = '-' -o "${7}" = '' ] && arg=''
 | 
			
		||||
		[ "$uid" = '-' -o "$uid" = '' ] && uid=0
 | 
			
		||||
		[ "$gid" = '-' -o "$gid" = '' ] && gid=0
 | 
			
		||||
		[ "$age" = '-' -o "$age" = '' ] && age=0
 | 
			
		||||
		[ "$arg" = '-' -o "$arg" = '' ] && arg=''
 | 
			
		||||
		set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
 | 
			
		||||
 | 
			
		||||
		[ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
 | 
			
		||||
 
 | 
			
		||||
@@ -133,7 +133,7 @@ do_check(char *path, uid_t uid, gid_t gid, mode_t mode, inode_t type,
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (mode && (st.st_mode & 0777) != mode) {
 | 
			
		||||
		einfo("%s: correcting mode", applet);
 | 
			
		||||
		einfo("%s: correcting mode", path);
 | 
			
		||||
		if (chmod(path, mode)) {
 | 
			
		||||
			eerror("%s: chmod: %s", applet, strerror(errno));
 | 
			
		||||
			return -1;
 | 
			
		||||
 
 | 
			
		||||
@@ -390,11 +390,8 @@ mountinfo(int argc, char **argv)
 | 
			
		||||
	char real_path[PATH_MAX + 1];
 | 
			
		||||
	int opt;
 | 
			
		||||
	int result;
 | 
			
		||||
	bool quiet;
 | 
			
		||||
	char *this_path;
 | 
			
		||||
 | 
			
		||||
	quiet = rc_yesno(getenv("EINFO_QUIET"));
 | 
			
		||||
 | 
			
		||||
#define DO_REG(_var)							      \
 | 
			
		||||
	if (_var) free(_var);						      \
 | 
			
		||||
	_var = get_regex(optarg);
 | 
			
		||||
@@ -483,7 +480,7 @@ mountinfo(int argc, char **argv)
 | 
			
		||||
		if (skip_point_regex &&
 | 
			
		||||
		    regexec(skip_point_regex, s->value, 0, NULL, 0) == 0)
 | 
			
		||||
			continue;
 | 
			
		||||
		if (! quiet)
 | 
			
		||||
		if (! rc_yesno(getenv("EINFO_QUIET")))
 | 
			
		||||
			printf("%s\n", s->value);
 | 
			
		||||
		result = EXIT_SUCCESS;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user