Compare commits

...

35 Commits

Author SHA1 Message Date
William Hubbs
0884271bdd init-linux: Do not remove the $rc_libexecdir/init.d directory
Reported-by: toralf.foerster@gmx.de
X-Gentoo-Bug: 446342
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=446342
2012-12-07 09:53:28 -06:00
William Hubbs
f837107ca5 bump version 2012-12-07 09:53:28 -06:00
William Hubbs
9c4582fbd7 migrate-to-run: do not require a reboot
The script that migrates the @libexecdir@/rc/init.d directory to
/run/openrc should not require a reboot.

Reported-by: chainsaw@gentoo.org
2012-12-06 17:57:00 -06:00
William Hubbs
ccb068c484 Do not add a prefix to the /run directory
This doesn't affect us on gentoo, but on archlinux, which has done the
/usr merge, OpenRC was looking for /run under PREFIX. /run is always at
the root level, so it shouldn't have prefix appended to it.

Reported-by: udeved@openrc4arch.site40.net
2012-12-06 17:57:00 -06:00
William Hubbs
603a308c6a Typo Fix 2012-12-06 17:57:00 -06:00
William Hubbs
fba6bbb4b6 start work on openrc-0.11.7 2012-12-06 17:06:47 -06:00
William Hubbs
ded282f163 typo fixes 2012-11-30 12:07:33 -06:00
William Hubbs
38ae822077 netmount: make "net" the default network option for now
Currently, we have the net virtual, so we should use it as the default
in this instance so that netmount comes up after it thinks the network
is up. However, this is technically eroneous, because there is no way to
know from the init system that we really have network connectivity.

Reported-by: cheepeero@gmx.net
X-Gentoo-Bug: 445116
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=445116
2012-11-29 17:42:50 -06:00
William Hubbs
611ed42044 localmount: only skip unmounting /usr if it was premounted
Add a test when localmount is started to determine if /usr is mounted
from inside an initramfs for Linux systems. If it is not, we can unmount it when
localmount stops.

On *bsd systems, we always unmount /usr if it is separate.

Reported-by: ryao@gentoo.org
2012-11-29 17:42:50 -06:00
William Hubbs
3f719bbb8b migrate-to-run: Remove old RC_SVCDIR after unmounting tmpfs
reporrrrted-by: netfab@gmail.com
X-Gentoo-Bug: 443996
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=443996
2012-11-29 17:42:50 -06:00
William Hubbs
e37b84a37d Start work on 0.11.6 2012-11-29 17:26:01 -06:00
William Hubbs
9fdee75936 firewalld: fix firewall-cmd dependency
This should be "program" instead of "program start".
2012-11-10 15:11:21 -06:00
William Hubbs
dd261a2a54 tmpfiles: fix bashism
reported-by: <pesa@gentoo.org>
2012-11-10 15:10:27 -06:00
Doug Goldstein
b36ef234be oldnet: add firewalld support 2012-11-10 15:07:30 -06:00
William Hubbs
a2c3660b87 start work on openrc-0.11.5 2012-11-10 15:05:10 -06:00
Robin H. Johnson
e473ab968c tmpfilesd: Doing both create+remove at the same time is valid.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-05 15:36:10 -06:00
William Hubbs
b8a5a1a309 increment version for hot fix for tmpfiles 2012-11-05 15:33:57 -06:00
William Hubbs
8046427d7f increment version
This sets up for the release of openrc-0.11.3. The release will be
tagged when it is ready.
2012-11-02 18:56:53 -05:00
William Hubbs
c73173ae53 Tmpfiles: create and delete entries once in the boot runlevel.
Initially, we were creating tmpfiles entries in the sysinit runlevel and
again in the boot runlevel. Systemd runs the --create and --remove
options in one service called systemd-tmpfiles-setup after the local
file systems are mounted. Now we have a service called tmpfiles.setup
which emulates this.

This also closes the bug mentioned below, since we were originally
writing to files that were on read-only file systems and that were not
available.

Reported-by: <devurandom@gmx.net>
X-Gentoo-Bug: 439012
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439012
2012-10-31 17:38:41 -05:00
William Hubbs
2964fc47f1 Expand the documentation for service configuration variables
The original documentation for these variables did not give an example
of what to do if the service had a name that had illegal characters in
it, so this commit adds an example. There was no bug report; this was
suggested by Tobias Klausmann.
2012-10-30 11:19:53 -05:00
William Hubbs
0396f0ea7c Oldnet: make carrier timeout documentation consistent 2012-10-28 15:02:41 -05:00
William Hubbs
78a25883f3 Checkpath: print the path when correcting the owner
Checkpath was printing the path it was working with unless it was
correcting the owner. In this case, it was printing "checkpath", which
is not very useful.

Reported-by: <devurandom@gmx.net>
X-Gentoo-Bug: 439014
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439014
2012-10-28 15:02:41 -05:00
William Hubbs
18dc0efa52 netmount: drop need net from dependencies
Reported-by: <mattsch@gmail.com>
X-Gentoo-Bug: 439658
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439658
2012-10-28 15:02:41 -05:00
William Hubbs
f53645b7c7 mountinfo: respect the -q command line option
Previously, we were setting the quiet flag before the command line was
parsed. Since the flag is only used once, we can just read the
environment variable which is set by the parsing process.

Reported-by: <devurandom@gmx.net>
X-Gentoo-Bug: 439010
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=439010
2012-10-28 15:02:41 -05:00
William Hubbs
a75a9940b0 oldnet: document the carrier_timeout option 2012-10-28 15:02:41 -05:00
William Hubbs
e27f0acc60 oldnet: make the default carrier timeout 0
Some types of interfaces do not have a carrier, so it doesn't make sense
to automatically wait for one.

Reported-by: <rose@rz.uni-potsdam.de>
X-Gentoo-Bug: 438970
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=438970
2012-10-22 16:30:34 -05:00
William Hubbs
5c8ba80ea7 release openrc-0.11.2 2012-10-22 02:38:31 -05:00
Andrew Gregory
e8ad6d2423 fix typo in rc-status.8
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2012-10-22 00:12:27 -05:00
Andrew Gregory
aa34435cc8 tmpfilesd: parse arguments with spaces
systemd allows the final arg in tmpfiles to contain spaces.  Using the read()
call to set the variables includes all trailing components in $arg so it
doesn't get cut off.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2012-10-22 00:12:27 -05:00
Andrew Gregory
68f8e8aac2 tmpfiles: return success from _f/_F on empty $arg
'[ -n "$arg" ] && _w' causes _f/_F to return the failure from the test when
$arg is empty.  Inverting the test causes the test and _f/_F to return success.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2012-10-21 22:37:39 -05:00
William Hubbs
ee54bfef05 tmpfiles: do not process systemd.conf
This file contains definitions specific to systemd, so we should not
process it.

Reported-by: <andrew.gregory.8@gmail.com>
2012-10-21 14:52:37 -05:00
William Hubbs
7279b469ec release openrc-0.11.1 2012-10-19 22:30:40 -05:00
William Hubbs
8482008559 tmfiles: change need dev to use dev.
This is being changed to use for the reason I stated in the previous
commit. There is no guarantee that someone is using a device manager.
2012-10-19 21:52:20 -05:00
William Hubbs
463d4ef00a devfs: Remove references to specific device managers
There were references in the devfs script to mdev, udev and
udev-mount. These all provide the virtuals dev and dev-mount; that is
how we should refer to them.

I believe in the discussion I had with Tony and Robin about this, we
were going to change the "use" line to "need". However, after thinking
that over, I'm not comfortable doing so because someone could be running
a static /dev with no device manager.

Reported-by: <tokiclover@gmail.com>
X-Gentoo-Bug: 438932
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=438932
2012-10-19 21:50:51 -05:00
William Hubbs
b5629d4ea0 Fix bashism in tmpfilesd scripts
Reported-by: <pesa@gentoo.org>
2012-10-19 13:09:58 -05:00
26 changed files with 160 additions and 103 deletions

View File

@@ -1,3 +1,3 @@
NAME= openrc
VERSION= 0.11
VERSION= 0.11.8
PKG= ${NAME}-${VERSION}

View File

@@ -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

40
conf.d/netmount Normal file
View File

@@ -0,0 +1,40 @@
# You will need to set the dependencies in the netmount script to match
# the network configuration tools you are using. This should be done in
# this file by following the examples below, and not by changing the
# service script itself.
#
# Each of these examples is meant to be used separately. So, for
# example, do not set rc_need to something like "net.eth0 dhcpcd".
#
# If you are using newnet and configuring your interfaces with static
# addresses with the network script, you should use this setting.
#
#rc_need="network"
#
# If you are using oldnet, you must list the specific net.* services you
# need.
#
# This example assumes all of your netmounts can be reached on
# eth0.
#
#rc_need="net.eth0"
#
# This example assumes some of your netmounts are on eth1 and some
# are on eth2.
#
#rc_need="net.eth1 net.eth2"
#
# If you are using a dynamic network management tool like
# networkmanager, dhcpcd in standalone mode, wicd, badvpn-ncd, etc, to
# manage the network interfaces with the routes to your netmounts, you
# should list that tool.
#
#rc_need="networkmanager"
#rc_need="dhcpcd"
#rc_need="wicd"
#
# The default setting is designed to be backward compatible with our
# current setup, but you are highly discouraged from using this. In
# other words, please change it to be more suited to your system.
#
rc_need="net"

View File

@@ -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.

View File

@@ -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"
@@ -1130,6 +1137,13 @@
# Hypothetical network card that requires a change-eeprom toggle to enable flashing
#ethtool_order_eth0="change-eeprom flash change pause coalesce ring offload nfc rxfh-indir ntuple"
#-----------------------------------------------------------------------------
# Firewalld support
# If you are using the firewalld daemon to configure your firewall
# settings and you have specific zones you want to apply to your
# interfaces, you can do this here.
#firewalld_zone_eth0="myzone"
##############################################################################
# ADVANCED CONFIGURATION
#

View File

@@ -21,7 +21,7 @@
rc_tty_number=12
# If you have cgroups turned on in your kernel, this switch controls
# whether or not a group for each controler is mounted under
# whether or not a group for each controller is mounted under
# /sys/fs/cgroup.
# Support for process management by cgroups is planned in the future,
# so if you turn this off, be aware that you may not be able to use that

View File

@@ -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
View File

@@ -41,5 +41,4 @@ syslogd
termencoding
ttys
wscons
tmpfilesd.boot
tmpfilesd.sysinit
tmpfiles.setup

View File

@@ -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

View File

@@ -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
}

View File

@@ -22,6 +22,9 @@ start()
if [ "$RC_UNAME" = Linux ]; then
no_netdev="-O no_netdev"
if mountinfo -q /usr; then
touch $RC_SVCDIR/usr_premounted
fi
fi
ebegin "Mounting local filesystems"
mount -at "$types" $no_netdev
@@ -48,7 +51,10 @@ stop()
done
if [ "$RC_UNAME" = Linux ]; then
no_umounts_r="$no_umounts_r|/proc|/proc/.*|/run|/sys|/sys/.*|/usr"
no_umounts_r="$no_umounts_r|/proc|/proc/.*|/run|/sys|/sys/.*"
if [ -e $rc_svcdir/usr_premounted ]; then
no_umounts_r="$no_umounts_r|/usr"
fi
fi
no_umounts_r="^($no_umounts_r)$"

View File

@@ -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

View File

@@ -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

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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.

View File

@@ -13,7 +13,7 @@ SRCS-Linux= iwconfig.sh.in
INC-Linux= adsl.sh apipa.sh arping.sh bonding.sh br2684ctl.sh bridge.sh \
ccwgroup.sh clip.sh ethtool.sh iproute2.sh ifplugd.sh ip6to4.sh \
ipppd.sh iwconfig.sh netplugd.sh pppd.sh pump.sh tuntap.sh udhcpc.sh \
vlan.sh macvlan.sh ip6rd.sh
vlan.sh macvlan.sh ip6rd.sh firewalld.sh
SRCS-NetBSD=
INC-NetBSD= ifwatchd.sh

38
net/firewalld.sh Normal file
View File

@@ -0,0 +1,38 @@
# Copyright (c) 2012 Doug Goldstein <cardoe@cardoe.com>
# Released under the 2-clause BSD license.
firewalld_depend()
{
after interface
before dhcp
program firewall-cmd
[ "$IFACE" != "lo" ] && need firewalld
}
_config_vars="$_config_vars firewalld_zone"
firewalld_post_start()
{
local firewalld_zone=
eval firewalld_zone=\$firewalld_zone_${IFVAR}
_exists || return 0
if [ "${IFACE}" != "lo" ]; then
firewall-cmd --zone="${firewalld_zone}" \
--change-interface="${IFACE}" > /dev/null 2>&1
fi
return 0
}
firewalld_pre_stop()
{
_exists || return 0
if [ "${IFACE}" != "lo" ]; then
firewall-cmd --remove-interface="${IFACE}" > /dev/null 2>&1
fi
return 0
}

View File

@@ -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

View File

@@ -51,6 +51,10 @@ if [ ! -d /run ]; then
fi
fi
if [ -L /run/openrc ]; then
rm /run/openrc
fi
if [ "$sys" = VSERVER ]; then
rm -rf /run/*
elif ! mountinfo -q /run; then

View File

@@ -9,41 +9,21 @@ if ! mountinfo -q -f tmpfs "@LIBEXECDIR@/init.d"; then
exit 0
fi
if [ ! -d "@PREFIX@/run" ]; then
eerror "'@PREFIX@/run' is not a directory."
eerror "This means the OpenRC dependency data cannot be migrated."
eerror "Please create the '@PREFIX@/run' directory and reboot the system."
exit 1
if [ ! -d /run ]; then
eerror "/run is not a directory."
eerror "moving /run to /run.pre-openrc"
mv /run /run.pre-openrc
mkdir /run
fi
if ! mountinfo -q -f tmpfs "@PREFIX@/run"; then
for x in "@PREFIX@/run/."* "@PREFIX@/run/"*; do
case "$x" in
"@PREFIX@/run/."|"@PREFIX@/run/..")
continue
;;
esac
if [ -e "$x" ]; then
eerror "Your '@PREFIX@/run' directory contains files."
eerror "Please reboot the system."
exit 1
fi
done
rm -rf /run/openrc
mount -t tmpfs -o mode=0755,nosuid,nodev \
tmpfs "@PREFIX@/run" 2> /dev/null
if [ $? != 0 ]; then
eerror "Unable to mount a tmpfs on '@PREFIX@/run'."
eerror "This means the OpenRC dependency data cannot be migrated."
eerror "Please create the '@PREFIX@/run' directory and reboot the system."
exit 1
fi
if ! mountinfo -q -f tmpfs /run; then
ln -s "@LIBEXECDIR@"/init.d /run/openrc
else
cp -a "@LIBEXECDIR@/init.d" /run/openrc
rc-update -u
fi
rm -rf "@PREFIX@/run/openrc"
cp -a "@LIBEXECDIR@/init.d" "@PREFIX@/run/openrc"
rc-update -u
rm -rf "@LIBEXECDIR@/init.d"
umount "@LIBEXECDIR@/init.d"
einfo "The OpenRC dependency data was migrated successfully."
exit 0

View File

@@ -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}
@@ -231,7 +232,7 @@ if [ $(( CLEAN )) -eq 1 ] ; then
exit 1
fi
if [ $(( CREATE + REMOVE )) -ne 1 ] ; then
if [ "$CREATE$REMOVE" = '00' ]; then
printf 'usage: %s [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
exit 1
fi
@@ -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 "$@"

View File

@@ -40,7 +40,7 @@ __BEGIN_DECLS
#if defined(PREFIX)
#define RC_SVCDIR RC_LIBEXECDIR "/init.d"
#elif defined(__linux__)
#define RC_SVCDIR "@PREFIX@/run/openrc"
#define RC_SVCDIR "/run/openrc"
#else
#define RC_SVCDIR RC_LIBEXECDIR "/init.d"
#endif

View File

@@ -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;

View File

@@ -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;
}