Commit Graph

2267 Commits

Author SHA1 Message Date
William Hubbs
b44f96ac9b init.sh.Linux: do not try to remove the /run/openrc symlink
In order to make migration from /lib*/rc/init.d to /run/openrc possible
without rebooting, the migration script creates a symlink from
/run/openrc to /lib*/rc/init.d. We were trying to remove it on the next
reboot, but this is not possible since / is ro when /run is mounted.

Reported-by: fturco@fastmail.fm
X-Gentoo-Bug: 447678
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=447678
2012-12-19 11:42:32 -06:00
Mike Frysinger
7557d62870 net.lo: sleep *after* carrier check
For devices that are always connected (e.g. ethernet cards), the current
carrier always wastes time by sleeping for 1 second.  This is because the
code sleeps first, then checks for carrier.  Invert the order so that we
return quickly for devices already active.  For devices which are not yet
up, there shouldn't be any real difference.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-18 00:24:02 -05:00
Mike Frysinger
2c60282ba9 fsck: simplify skiplist setup
Use printf rather than a manual for loop.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-18 00:24:02 -05:00
Steve L
8d61d03e27 localmount: quoting fixes
X-Gentoo-Bug: 446556
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=446556
2012-12-16 20:00:01 -06:00
William Hubbs
230a678824 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:39:12 -06:00
William Hubbs
e5173b9127 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 16:43:24 -06:00
William Hubbs
a9272f50f7 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-03 18:33:21 -06:00
William Hubbs
31bcc6bee4 Typo Fix 2012-12-03 14:59:22 -06:00
William Hubbs
c5e163cffc typo fixes 2012-11-30 12:05:26 -06:00
William Hubbs
8661af3223 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 12:34:34 -06:00
William Hubbs
5cce37837b 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 10:19:20 -06:00
William Hubbs
0a72893c8b 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-25 21:27:36 -06:00
Alexander Vershilov
4f19c2f512 Support cpu usage management for Linux
This commit was modified by William Hubbs as follows:

- The paths in the cgroup fs were put into variables to ease
  maintenance.
- Documentation was added to rc.conf.Linux.
- The services were added originally to openrc/svcname cgroups under the
  controller cgroups, but this left an "openrc" cgroup which was unused.
  Now they are added to individual cgroups with the name openrc_${RC_SVCNAME}.
2012-11-12 10:58:00 -06:00
William Hubbs
cf7b904704 firewalld: fix firewall-cmd dependency
This should be "program" instead of "program start".
2012-11-10 14:56:33 -06:00
Robin H. Johnson
23f975dfcd checkbashisms: Fix redirection order.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-07 01:44:56 +00:00
Robin H. Johnson
ca6019031a net/apipa: checkbashisms false positive.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-07 01:44:26 +00:00
Robin H. Johnson
4ec1edc1f8 Whitespace.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-07 00:32:09 +00:00
Robin H. Johnson
1b0130961e checkbashisms: clean up export statements.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-07 00:22:33 +00:00
Robin H. Johnson
3809eac54d net/iwconfig: Even more bashism fun.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-07 00:13:58 +00:00
Robin H. Johnson
dabd8b22ca checkbashisms: export syntax.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:21:40 +00:00
Robin H. Johnson
54562d3525 net/vlan: checkbashisms.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:18:32 +00:00
Robin H. Johnson
ed3b0c66f9 net/bonding: checkbashisms.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:18:08 +00:00
Robin H. Johnson
91e28ab775 init.d/hostname: Document checkbashism false positive.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:12:24 +00:00
Robin H. Johnson
87daa26ca7 init.d/mtab: Another instance of the same pattern matching case.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:02:56 +00:00
Robin H. Johnson
670589571e init.d/bootmisc: Another instance of the same pattern matching case.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:01:42 +00:00
Robin H. Johnson
f6c3896087 init.d/bootmisc: POSIX XSI shellism.
In a pathname expansion, specifically single-character match, the pure
POSIX specification uses '!' as the Negation character where a regular
expression would normally be '^'.

Regular expression: "a[^a]a"
Pathname expansion pattern: "a[!a]a"

Reference:
IEEE Std 1003.1, 2004 Edition
2. Shell Command Language
2.13 Pattern Matching Notation
2.13.1 Patterns Matching a Single Character

> The description of basic regular expression bracket expressions in the
> Base Definitions volume of IEEE Std 1003.1-2001, Section 9.3.5, RE
> Bracket Expression shall also apply to the pattern bracket expression,
> except that the exclamation mark character ( '!' ) shall replace the
> circumflex character ( '^' ) in its role in a "non-matching list" in
> the regular expression notation. A bracket expression starting with an
> unquoted circumflex character produces unspecified results.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 22:49:49 +00:00
William Hubbs
ec60e20331 tmpfiles: fix bashism
reported-by: <pesa@gentoo.org>
2012-11-06 16:32:59 -06:00
Doug Goldstein
5657fa7975 oldnet: add firewalld support 2012-11-05 17:20:08 -06:00
Robin H. Johnson
4936b72e0f tmpfilesd: Doing both create+remove at the same time is valid.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-05 21:25:32 +00:00
William Hubbs
5cf5308ab4 increment version
I have learned that it is better to increment the version early. This
way keeps track of the version that is being worked on on the branch and
the tag marks when the release actually happens.
2012-11-02 16:38:57 -05:00
William Hubbs
1a8cd5ff9d 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:33:14 -05:00
William Hubbs
eff07c48b7 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:12:20 -05:00
William Hubbs
ff2e1d42a2 Oldnet: make carrier timeout documentation consistent 2012-10-28 14:29:33 -05:00
William Hubbs
e634376482 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-27 12:59:58 -05:00
William Hubbs
5148047f89 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-25 16:33:56 -05:00
William Hubbs
978dbe0284 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-24 12:29:29 -05:00
William Hubbs
8df18defe1 oldnet: document the carrier_timeout option 2012-10-22 09:35:14 -05:00
William Hubbs
8d17c634db 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 09:23:04 -05:00
Andrew Gregory
06658d1038 fix typo in rc-status.8
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2012-10-21 19:51:09 -05:00
Andrew Gregory
525c731f0e 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-21 19:50:54 -05:00
Andrew Gregory
5647946e61 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 19:49:42 -05:00
William Hubbs
74c6b554bc 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:50:29 -05:00
William Hubbs
e8acdc6f85 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:45:14 -05:00
William Hubbs
2a9de2df58 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 20:53:46 -05:00
William Hubbs
2ee3e9d952 Fix bashism in tmpfilesd scripts
Reported-by: <pesa@gentoo.org>
2012-10-19 13:02:30 -05:00
William Hubbs
4385d31d9d release openrc-0.11 2012-10-18 10:10:10 -05:00
William Hubbs
20af890ac2 Spacing fixes 2012-10-17 18:47:36 -05:00
William Hubbs
21abe9821c tests: fix the paths
When the test suite is being run, we need our local directories in PATH
and LD_LIBRARY_PATH before the system directories. This makes sure we
run our tests using the currently built tree.
2012-10-17 18:13:47 -05:00
William Hubbs
f886372749 functions.sh: do not hard code path in e* wrapper functions
We should use the "command" shell builtin to execute a binary from
within the wrapper with the same name. Hard coding the path to the
binary makes our test suite fail.
2012-10-17 17:55:02 -05:00
Lorand Kelemen
f671e0a28f Oldnet: bonding: set miimon correctly
Miimon needs to be activated before downdelay is set.

X-Gentoo-Bug: 421757
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=421757
2012-10-17 12:53:17 -05:00