Commit Graph

49 Commits

Author SHA1 Message Date
William Hubbs
fd80b6fc67 localmount/netmount: clean up critical mount processing
Fix a typo and do not fail if a path in critical_mounts is not listed as
a critical mount does not get mounted.
2016-04-26 12:43:50 -05:00
William Hubbs
5d130cc45c localmount/netmount: allow mount points to be marked critical
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.
2016-04-25 12:04:34 -05:00
William Hubbs
cd7883d25d localmount: Allow users to control whether errors are ignored
X-Gentoo-Bug: 572138
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572138
2016-01-19 13:34:04 -06:00
William Hubbs
000503fad7 Convert OpenRC to a centralized copyright/license structure
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
2015-12-21 12:16:06 -06:00
William Hubbs
d5116cc697 localmount: white space cleanup 2015-10-08 13:20:14 -05:00
Ian Stakenvicius
b86d170037 localmount: clean up handling of aufs branches
X-Gentoo-Bug: 560008
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=560008
2015-10-08 12:49:09 -05:00
William Hubbs
dac5966ca4 Revert "local/netmount: remove uses of -O [no]_netdev"
This reverts commit 2a439c85bd.
There is another use case for -O involving iscsi, so we can't remove it.
2015-10-01 17:33:43 -05:00
William Hubbs
b047ea47e9 localmount/netmount: on Linux, fail if some file systems do not mount
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.
2015-09-01 14:41:07 -05:00
William Hubbs
b652752339 Make localmount and netmount always succeed on non-linux 2015-08-21 12:21:31 -05:00
William Hubbs
2a439c85bd local/netmount: remove uses of -O [no]_netdev
This was causing an incompatibility with busybox, and we do not use it
in Gentoo.
2015-08-18 18:25:48 -05:00
William Hubbs
7341cd882f allow localmount and netmount to fail 2015-08-17 18:21:39 -05:00
Mike Gilbert
7bd456ed7b Disable service scripts for systemd-nspawn
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
2015-05-01 09:14:09 -05:00
Rick Farina (ZeroChaos)
ad770d739c localmount: unmount aufs branches 2014-10-06 16:24:44 -05:00
William Hubbs
3470eda3f5 Rename runscript to openrc-run
This was requested by Debian, because the minicom software, which is
available on Debian and other distros, has a binary named runscript. We
are keeping a backward compatibility symlink for now, but this allows
Debian or any other distro to safely remove the symlink.

X-Gentoo-Bug: 494220
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=494220
2013-12-29 22:57:31 -06:00
William Hubbs
d2988dc7dd remove redundant sync calls
The localmount and mount-ro scripts were flushing pending disk writes by
calling sync twice in succession. This is no longer necessary; see the
bug report and blog post for reasons we were still doing this.

Reported-by: Patrick Lauer <patrick@gentoo.org>
X-Gentoo-Bug: 487382
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487382
2013-10-18 16:32:51 -05:00
Daniel Robbins
e6df76a377 FL-786: localmount: support filesystem mounting on openvz 2013-10-04 15:16:05 -05:00
William Hubbs
19fa20832c localmount: add "no" in front of network file system types
On Linux, this was not an issue, but we may have been attempting to
mount network file systems twice on *bsd.

Reported-by: powerman-asdf@yandex.ru
x-Gentoo-Bug: 462210
x-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=462210
2013-03-22 14:50:27 -05:00
Andrew Gregory
8a44067838 Fix shebangs in services to point to the correct location of runscript
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>
2013-02-23 20:30:39 -06: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
c5e163cffc typo fixes 2012-11-30 12:05:26 -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
e641b43849 Bring Back prefix support
We now have a team member who is interested in OpenRC on prefix, so I am
bringing it back to the main tree.
2012-07-26 10:54:48 -05:00
William Hubbs
ee1a698451 do not umount /usr on linux systems
We can't really umount /usr on linux systems because /usr is a special
case if it is a separate filesystem which is handled by an initramfs.

reported-by: tamiko+GENTOO@kyomu.43-1.org
X-Gentoo-Bug: 415523
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=415523
2012-05-13 19:00:39 -05:00
William Hubbs
533813dda0 localmount: Only unmount local filesystems if we are shutting down
Make the stop function in localmount only unmount file systems when the
system is going down.

reported-by: Alexey Prokopchuk <alexpro@homelan.lg.ua>
X-Gentoo-Bug: 407167
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=407167
2012-03-25 18:38:13 -05:00
William Hubbs
3247184d86 Remove prefix support
I spoke with the prefix team sometime back and was told that they do not
have an interest in using OpenRC on prefix systems.
2012-02-21 07:27:16 -06:00
William Hubbs
1c7d3165e4 Allow localmount to run in openvz containers
Reported-By: Daniel Robbins <drobbins@funtoo.org>
X-Gentoo-Bug: 401063
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401063
2012-02-13 12:15:55 -06:00
Christian Ruppert
2d180551ef Fix regex pattern for umounts during shutdown
This patch fixes the regex pattern for /lib -> /lib(32|64)?
as well as the pattern for RC_SVCDIR if it contains /lib(32|64)?/.
This fixes bug 381783.

X-Gentoo-Bug: 381783
X-Gentoo-Bug-URL: https://bugs.gentoo.org/381783
2011-09-11 18:51:29 +02:00
Kirill Elagin
0c7032840b save and restore IFS correctly
X-Gentoo-Bug: 371141
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=371141
2011-07-07 12:23:58 -05:00
William Hubbs
e8e86b96dc fix issue with extra_net_fs_list
The extra_net_fs_list variable was not being included as it should have
been for the net file systems because it was being expanded before it
was set by the user.

X-Gentoo-Bug: 374133
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=374133
2011-07-05 18:41:33 -05:00
Mike Frysinger
d0bc4f20ad drop useless "All rights reserved" notice
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-29 19:46:31 -04:00
Kirill Elagin
2050e67911 localmount: make OIFS and CIFS local in stop function
X-Gentoo-Bug: 371141
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=371141
2011-06-24 12:13:28 -05:00
Lars Wendler
ede4d1cd60 Don't unmount /run on shutdown
This is needed so that udev will stop properly on shutdown.

X-Gentoo-Bug: 363971
X-Gentoo-Bug-Url: http://bugs.gentoo.org/show_bug.cgi?id=363971
2011-04-18 15:26:19 -05:00
Anthony G. Basile
c8b5078660 Fix bug #354805 2011-02-14 04:41:08 -05:00
Robin H. Johnson
e431599d08 Add "after lvm modules" as Flameeyes reports that LVM is starting too late on his system in some cases. 2010-12-11 14:25:46 -08:00
William Hubbs
cdf07b5970 localmount should only use the -O option for linux systems
This fixes bug #347307.
2010-11-30 15:40:44 -06:00
William Hubbs
ac37dc2764 do not mount local file systems with the _netdev option in fstab
This fixes #344947.
2010-11-15 12:01:48 -06:00
Roy Marples
95ee39ab1c Add support for Linux Containers, fixes #202.
Patch by bug reporter.
2009-11-04 19:21:24 +00:00
Roy Marples
b4104957b1 We should use -feature instead of nofeature.
This matches the ifconfig and Gentoo USE flag syntax and is hopefully
easier to read.
Fixes #178.
2009-07-01 00:07:32 +01:00
Roy Marples
c0fd1b49e4 Move non compiled libraries from /lib/rc to /libexec/rc
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.
2009-05-23 20:38:12 +01:00
Roy Marples
658a220638 Add (c) to Copyright 2009-05-01 15:11:40 +01:00
Roy Marples
e70a142956 Style. 2009-04-27 07:51:18 +00:00
Roy Marples
bbd810425b Move special umount of tmpfs to the swap init script where it belongs, #149. 2009-04-19 11:15:37 +00:00
Roy Marples
744a8bbb4a Don't unmount /bin,/sbin,/lib,/libexec in the very silly cases where they are not on / 2009-04-16 23:34:38 +00:00
Roy Marples
7183cb1b18 Fix last commit 2008-07-09 16:20:48 +00:00
Roy Marples
b83108cd2e Add a knob to avoid the unmounting of some points. 2008-07-09 16:08:38 +00:00
Roy Marples
fba18b3a48 localmount uses lvm 2008-03-05 08:40:17 +00:00
Roy Marples
15cf41e713 Split VPS into VSERVER and OPENVZ 2008-03-03 17:19:56 +00:00
Roy Marples
67c5fd6bb8 Ensure that our scripts call prefixed runscript. 2008-03-02 21:14:01 +00:00
Roy Marples
a12dbdc6c9 Don't check for root in prefix. 2008-03-02 21:13:21 +00:00