In previous releases, we either treated no mount points as critical or
all of them.
Now both localmount and netmount support a critical_mounts setting. If
mount points listed in this setting fail to mount, localmount and
netmount will fail.
Before this commit, on Linux, we were always trying to mount file
systems marked with _netdev, even when the previous mount command
failed. Now, we do not run the second mount if the first fails.
X-Gentoo-Bug: 579876
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=579876
Netifrc is no longer part of OpenRC, so we shouldn't save its dep tree
as part of savecache.
This should have been removed when netifrc was split out. also, it
might be related to the following bug.
X-Gentoo-Bug: 563720
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=563720
In the past, OpenRC was a hybrid of a centralized and file-scope
license/copyright structure.
I followed the instructions from the Software Freedom Law Center [1] to
convert to a Centralized structure where possible, for easier future
maintenance.
[1] https://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
add in parsing of fstab to determine if nfsclient should be automatically
started so that netmount can mount nfs without adding nfsclient
to the default runlevel
This fixes#71.
This advises users to remove mtab from their runlevels if /etc/mtab is a
symlink, and it creates the symlink if /etc/mtab does not exist on a
system.
X-Gentoo-Bug: 560060
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=560060
The following return codes are returned by mount -a:
0: all file systems mounted.
32: no file systems mounted.
64: some file systems mounted.
The localmount/netmount services should fail if all file systems that
should mount did not mount.
This adds the -systemd-nspawn keyword to service scripts which are not
intended to run in systemd-nspawn containers.
This fixes#52.
X-Gentoo-Bug: 548058
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=548058
This changes the mtab service in the following way:
- If /etc/mtab is a symbolic link, success is returned.
- If /etc is not writable, we warn that we could not update /etc/mtab
and return success.
- If /etc/mtab does not exist, we create a symbolic link from
/etc/mtab to /proc/self/mounts.
- Otherwise, we warn that updating /etc/mtab as a file is
deprecated and continue to update it after outputting instructions to
the user for how to move it to a symbolic link.
The cache directory should be created via mkdir -p instead of
mkdir. This makes sure all parent directories are created.
Also, we now display an error message explaining that we were unable to
create the cache directory if creation fails.
We were originally checking to see if $RC_LIBEXECDIR/cache was writable. For
a new install, this check will fail since this path does not exist. This
is also incorrect because later we create $RC_LIBEXECDIR/cache.
The correct check is checkpath -W $RC_LIBEXECDIR, and this fixes the
issue.
X-Gentoo-Bug: 544632
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=544632
This makes binfmt processing behave like tmpfiles processing which
follows the same specification as systemd.
This fixes#48.
X-Gentoo-Bug: 545162
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=545162
It appears that the only reason we were force loading the usbcore
module was to facilitate mounting usbfs. Since we no longer mount
usbfs, this is no longer necessary.
X-Gentoo-Bug: 480312
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=480312
The usbfs and usbdevfs file systems have been deprecated since
Linux-2.6.32, so we remove the code to automount them.
X-Gentoo-Bug: 480312
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=480312
The selinux file system is mounted under /sys, so move the code for it
to the appropriate service.
X-Gentoo-Bug: 546290
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=546290
The local service should use eval when it executes scripts since it has
the redirection set up in a variable.
This fixes#50.
X-Gentoo-Bug: 545012
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=545012
checkpath -W can fail if the specified path doesn't actually exist yet.
In this case savecache script should attempt to create the path if it is
missing, however it is pre-empted by the checkpath call. This patch adds
an explicit existence test before executing checkpath.
This fixes#36.
If /tmp or / are read-only, the clean_run function can fail in some very
bad ways.
1. dir=$(mktemp -d) returns an EMPTY string on error.
2. "mount -o bind / $dir", and don't check the result of that,
3. "rm -rf $dir/run/*", which removes the REAL /run contents
4. box gets very weird from this point forward
Signed-Off-By: Robin H. Johnson <robbat2@gentoo.org>
Signed-Off-By: Chip Parker <infowolfe@gmail.com>
Reported-by: Chip Parker <infowolfe@gmail.com>
Tested-by: Chip Parker <infowolfe@gmail.com>
The local service now redirects stdout and stderr for the scripts it
runs to /dev/null unless it is run in verbose mode.
X-Gentoo-Bug: 537444
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=537444