Compare commits
18 Commits
0.16.4
...
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
|
NAME= openrc
|
||||||
VERSION= 0.11
|
VERSION= 0.11.3
|
||||||
PKG= ${NAME}-${VERSION}
|
PKG= ${NAME}-${VERSION}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
DIR= ${CONFDIR}
|
DIR= ${CONFDIR}
|
||||||
CONF= bootmisc fsck hostname localmount urandom tmpfilesd ${CONF-${OS}}
|
CONF= bootmisc fsck hostname localmount netmount urandom tmpfiles \
|
||||||
|
${CONF-${OS}}
|
||||||
|
|
||||||
ifeq (${MKNET},)
|
ifeq (${MKNET},)
|
||||||
CONF+= network staticroute
|
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
|
# 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
|
# 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
|
# 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
|
# the interface. 0 is disable and any other number of seconds is how
|
||||||
# is how long we wait for carrier. The current default is 3 seconds
|
# long we wait for carrier. The current default is disabled.
|
||||||
#carrier_timeout_eth0=-1
|
#carrier_timeout_eth0=0
|
||||||
|
|
||||||
# You may wish to disable the interface being brought down when stopping.
|
# You may wish to disable the interface being brought down when stopping.
|
||||||
# This is only of use for WakeOnLan.
|
# 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
|
# 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.
|
# 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.
|
# You may wish to disable the interface being brought down when stopping.
|
||||||
# This is only of use for WakeOnLan.
|
# This is only of use for WakeOnLan.
|
||||||
#ifdown_eth0="NO"
|
#ifdown_eth0="NO"
|
||||||
|
|||||||
@@ -94,6 +94,10 @@
|
|||||||
# These variables are documented here, but should be configured in
|
# These variables are documented here, but should be configured in
|
||||||
# /etc/conf.d/foo for service foo and NOT enabled here unless you
|
# /etc/conf.d/foo for service foo and NOT enabled here unless you
|
||||||
# really want them to work on a global basis.
|
# 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.
|
# Some daemons are started and stopped via start-stop-daemon.
|
||||||
# We can set some things on a per service basis, like the nicelevel.
|
# We can set some things on a per service basis, like the nicelevel.
|
||||||
@@ -116,6 +120,13 @@
|
|||||||
#rc_foo_need="openvpn"
|
#rc_foo_need="openvpn"
|
||||||
#rc_foo_after="clock"
|
#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.
|
# You can also remove dependencies.
|
||||||
# This is mainly used for saying which servies do NOT provide net.
|
# This is mainly used for saying which servies do NOT provide net.
|
||||||
#rc_net_tap0_provide="!net"
|
#rc_net_tap0_provide="!net"
|
||||||
|
|||||||
3
init.d/.gitignore
vendored
3
init.d/.gitignore
vendored
@@ -41,5 +41,4 @@ syslogd
|
|||||||
termencoding
|
termencoding
|
||||||
ttys
|
ttys
|
||||||
wscons
|
wscons
|
||||||
tmpfilesd.boot
|
tmpfiles.setup
|
||||||
tmpfilesd.sysinit
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
DIR= ${INITDIR}
|
DIR= ${INITDIR}
|
||||||
SRCS= bootmisc.in fsck.in hostname.in local.in localmount.in netmount.in \
|
SRCS= bootmisc.in fsck.in hostname.in local.in localmount.in netmount.in \
|
||||||
root.in savecache.in swap.in swapfiles.in \
|
root.in savecache.in swap.in swapfiles.in \
|
||||||
tmpfilesd.boot.in tmpfilesd.sysinit.in \
|
tmpfiles.setup.in swclock.in sysctl.in urandom.in ${SRCS-${OS}}
|
||||||
swclock.in sysctl.in urandom.in ${SRCS-${OS}}
|
|
||||||
BIN= ${OBJS}
|
BIN= ${OBJS}
|
||||||
|
|
||||||
# Build our old net foo or not
|
# Build our old net foo or not
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
description="Mount system critical filesystems in /dev."
|
description="Mount system critical filesystems in /dev."
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
use dev-mount udev-mount
|
use dev-mount
|
||||||
before udev mdev
|
before dev
|
||||||
keyword -prefix -vserver
|
keyword -prefix -vserver
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ _wait_for_carrier()
|
|||||||
_has_carrier && return 0
|
_has_carrier && return 0
|
||||||
|
|
||||||
eval timeout=\$carrier_timeout_${IFVAR}
|
eval timeout=\$carrier_timeout_${IFVAR}
|
||||||
timeout=${timeout:-${carrier_timeout:-5}}
|
timeout=${timeout:-${carrier_timeout:-0}}
|
||||||
|
|
||||||
# Incase users don't want this nice feature ...
|
# Incase users don't want this nice feature ...
|
||||||
[ ${timeout} -le 0 ] && return 0
|
[ ${timeout} -le 0 ] && return 0
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ description="Mounts network shares, other than NFS, according to /etc/fstab."
|
|||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
config /etc/fstab
|
config /etc/fstab
|
||||||
need net
|
|
||||||
use afc-client amd autofs openvpn
|
use afc-client amd autofs openvpn
|
||||||
use dns
|
use dns
|
||||||
keyword -jail -prefix -vserver
|
keyword -jail -prefix -vserver
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2012 Gentoo Foundation
|
||||||
# Released under the 2-clause BSD license.
|
# Released under the 2-clause BSD license.
|
||||||
|
|
||||||
description="Create tmpfiles.d entries (boot)"
|
description="set up tmpfiles.d entries"
|
||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
@@ -11,8 +11,8 @@ depend()
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
ebegin "${description/Create/Creating}"
|
ebegin "setting up tmpfiles.d entries"
|
||||||
@LIBEXECDIR@/sh/tmpfiles.sh --create ${tmpfiles_opts}
|
@LIBEXECDIR@/sh/tmpfiles.sh --create --remove ${tmpfiles_opts}
|
||||||
eend $?
|
eend $?
|
||||||
return 0
|
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.
|
List all services that have crashed.
|
||||||
.It Fl l , -list
|
.It Fl l , -list
|
||||||
List all defined runlevels.
|
List all defined runlevels.
|
||||||
.It fl r , -runlevel
|
.It Fl r , -runlevel
|
||||||
Print the current runlevel name.
|
Print the current runlevel name.
|
||||||
.It Fl s , -servicelist
|
.It Fl s , -servicelist
|
||||||
Show all services.
|
Show all services.
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ BOOT-FreeBSD+= hostid newsyslog savecore syslogd
|
|||||||
# FreeBSD specific stuff
|
# FreeBSD specific stuff
|
||||||
BOOT-FreeBSD+= adjkerntz dumpon syscons
|
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
|
SHUTDOWN-Linux= killprocs mount-ro
|
||||||
SYSINIT-Linux= devfs dmesg sysfs tmpfilesd.sysinit
|
SYSINIT-Linux= devfs dmesg sysfs
|
||||||
|
|
||||||
# Generic BSD stuff
|
# Generic BSD stuff
|
||||||
BOOT-NetBSD+= hostid newsyslog savecore syslogd
|
BOOT-NetBSD+= hostid newsyslog savecore syslogd
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ _f() {
|
|||||||
|
|
||||||
if [ ! -e "$path" ]; then
|
if [ ! -e "$path" ]; then
|
||||||
dryrun_or_real install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path"
|
dryrun_or_real install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path"
|
||||||
[ -n "$arg" ] && _w "$@"
|
[ -z "$arg" ] || _w "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ _F() {
|
|||||||
[ $CREATE -gt 0 ] || return 0
|
[ $CREATE -gt 0 ] || return 0
|
||||||
|
|
||||||
dryrun_or_real install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path"
|
dryrun_or_real install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path"
|
||||||
[ -n "$arg" ] && _w "$@"
|
[ -z "$arg" ] || _w "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
_d() {
|
_d() {
|
||||||
@@ -201,6 +201,7 @@ tmpfiles_d=''
|
|||||||
# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
|
# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
|
||||||
for d in ${tmpfiles_dirs} ; do
|
for d in ${tmpfiles_dirs} ; do
|
||||||
[ -d $d ] && for f in ${d}/*.conf ; do
|
[ -d $d ] && for f in ${d}/*.conf ; do
|
||||||
|
[ "$f" = "$d/systemd.conf" ] && continue
|
||||||
[ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
|
[ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
|
||||||
done # for f in ${d}
|
done # for f in ${d}
|
||||||
done # for d in ${tmpfiles_dirs}
|
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.
|
# 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.
|
# 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 ))
|
LINENUM=$(( LINENUM+1 ))
|
||||||
|
|
||||||
# This will skip over comments and empty lines
|
|
||||||
set -- $line
|
|
||||||
|
|
||||||
# Unless we have both command and path, skip this 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
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# whine about invalid entries
|
# whine about invalid entries
|
||||||
case $1 in
|
case $cmd in
|
||||||
f|F|w|d|D|p|L|c|b|x|r|R|z|Z) ;;
|
f|F|w|d|D|p|L|c|b|x|r|R|z|Z) ;;
|
||||||
\#) continue ;;
|
\#) continue ;;
|
||||||
*) warninvalid ; continue ;;
|
*) warninvalid ; continue ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cmd=$1
|
|
||||||
path=$2
|
|
||||||
|
|
||||||
# fall back on defaults when parameters are passed as '-'
|
# fall back on defaults when parameters are passed as '-'
|
||||||
if [ "$3" = '-' -o "$3" = '' ]; then
|
if [ "$mode" = '-' -o "$mode" = '' ]; then
|
||||||
case ${1} in
|
case "$cmd" in
|
||||||
p|f|F) mode=0644 ;;
|
p|f|F) mode=0644 ;;
|
||||||
d|D) mode=0755 ;;
|
d|D) mode=0755 ;;
|
||||||
z|Z|x|r|R|L) ;;
|
z|Z|x|r|R|L) ;;
|
||||||
esac
|
esac
|
||||||
else
|
|
||||||
mode=$3
|
|
||||||
fi
|
fi
|
||||||
uid=$4
|
|
||||||
gid=$5
|
|
||||||
age=$6
|
|
||||||
arg=$7
|
|
||||||
|
|
||||||
[ "${4}" = '-' -o "${4}" = '' ] && uid=0
|
[ "$uid" = '-' -o "$uid" = '' ] && uid=0
|
||||||
[ "${5}" = '-' -o "${5}" = '' ] && gid=0
|
[ "$gid" = '-' -o "$gid" = '' ] && gid=0
|
||||||
[ "${6}" = '-' -o "${6}" = '' ] && age=0
|
[ "$age" = '-' -o "$age" = '' ] && age=0
|
||||||
[ "${7}" = '-' -o "${7}" = '' ] && arg=''
|
[ "$arg" = '-' -o "$arg" = '' ] && arg=''
|
||||||
set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
|
set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
|
||||||
|
|
||||||
[ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
|
[ "$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) {
|
if (mode && (st.st_mode & 0777) != mode) {
|
||||||
einfo("%s: correcting mode", applet);
|
einfo("%s: correcting mode", path);
|
||||||
if (chmod(path, mode)) {
|
if (chmod(path, mode)) {
|
||||||
eerror("%s: chmod: %s", applet, strerror(errno));
|
eerror("%s: chmod: %s", applet, strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -390,11 +390,8 @@ mountinfo(int argc, char **argv)
|
|||||||
char real_path[PATH_MAX + 1];
|
char real_path[PATH_MAX + 1];
|
||||||
int opt;
|
int opt;
|
||||||
int result;
|
int result;
|
||||||
bool quiet;
|
|
||||||
char *this_path;
|
char *this_path;
|
||||||
|
|
||||||
quiet = rc_yesno(getenv("EINFO_QUIET"));
|
|
||||||
|
|
||||||
#define DO_REG(_var) \
|
#define DO_REG(_var) \
|
||||||
if (_var) free(_var); \
|
if (_var) free(_var); \
|
||||||
_var = get_regex(optarg);
|
_var = get_regex(optarg);
|
||||||
@@ -483,7 +480,7 @@ mountinfo(int argc, char **argv)
|
|||||||
if (skip_point_regex &&
|
if (skip_point_regex &&
|
||||||
regexec(skip_point_regex, s->value, 0, NULL, 0) == 0)
|
regexec(skip_point_regex, s->value, 0, NULL, 0) == 0)
|
||||||
continue;
|
continue;
|
||||||
if (! quiet)
|
if (! rc_yesno(getenv("EINFO_QUIET")))
|
||||||
printf("%s\n", s->value);
|
printf("%s\n", s->value);
|
||||||
result = EXIT_SUCCESS;
|
result = EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user