Bootmisc was running before the root file system was remounted rw in
some situations. This fixes that issue.
X-Gentoo-Bug: 493442
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=493442
The posix equivalent of the type command is "command -v", so now we use
that. Thanks to Jonathan Callen <jcallen@gentoo.org> for informing me
wrt the fix.
SBINDIR and BINDIR can be set independently of PREFIX. This fixes
broken shebangs in service files when SBINDIR is set to something other
than PREFIX/sbin
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
The /run directory is a mount point for a tmpfs and should not contain
any files or directories. This cleans out the /run/openrc
symlink and any other files which were incorrectly placed in /run.
Thanks to Ian Stakenvicius for pointing out this solution.
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>
Baselayout-1.x used to have a DELAYLOGIN option where it would setup
/etc/nologin automatically and then delete it later on. OpenRC did
not keep that feature, and during the rewrites, ended up just punting
it all the time. This isn't what we intended, so drop the rm.
X-Gentoo-Bug: 400837
X-Gentoo-Bug-URL: https://bugs.gentoo.org/400837
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
The migrate-run service was hanging when parallel startup was enabled
because of its dependencies. This integrates the logic for this service
into bootmisc, which will avoid the issues with parallel startup.
I would like to thank Robin H. Johnson <robbat2@gentoo.org> for his
input on this patch
It is possible for bootmisc to take longer than 60 seconds to complete
and services should not time out waiting for it.
X-Gentoo-Bug: 360405
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=360405
Make sure that the `cd` into the $dir actually happened. This we don't
have to worry about relative paths deleting stuff it shouldn't. This
step shouldn't fail, but who knows, and better to be sane than to wipe
out someone's valuables.
When wiping, automatically fall back to a dedicated `find` if the initial
`rm` failed on us. This should help with the speed issues related to the
later `find`.
Have the later find only search the top level allowing `rm` to walk the
directory contents. This means that -xdev no longer applies, but since
the earlier `rm` wasn't doing -xdev either and no one has complained thus
far, let's assume it isn't an issue. Also convert to the -exec...+ form
so that we don't have to worry about long argument lists, and add -- to
the `rm` that was previously missing. In practice, this shouldn't matter
as we've already deleted all those files, but better safe than sorry.
When cleaning, since we've already done a `cd` into the $dir, no point in
prefixing all the paths with $dir too. Go with the relative loving.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
X-Gentoo-Bug: 359831
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=359831
- delete the contents of the $RC_LIBEXECDIR/console directory but not
the directory itself.
- direct error output from the chmod call for /tmp to /dev/null.
OpenRC version is now stored as plaintext in /libexec/rc/version
Plugins (cursplash, splashutils) will have to be re-compiled to pickup
the new directories. State data needs to be moved from /lib/rc/init.d
to /libexec/rc/init.d as well.