Commit Graph

514 Commits

Author SHA1 Message Date
William Hubbs
93ba67eff9 netmount: unmount nfs file systems 2014-11-06 14:38:17 -06:00
Ralph Sennhauser
0bfde472d0 Add osclock service
This scripts sole purpose is to "provide clock" on OSs that already
take care of the clock being properly set.
2014-10-27 18:13:22 -05:00
Svante Signell
203b754f84 add missing files for GNU/Hurd 2014-10-23 13:00:24 -05:00
Gabriele Giacone
d8e1d9a6ed Add missing files for GNU/kFreeBSD 2014-10-22 11:09:58 -05:00
William Hubbs
85da4a5e26 add back nfs and nfs4 file systems
Fix gentoo bug #427996 correctly.
We should attempt to mount the file systems, but not try to start the
daemons. The previous fix removed mounting the file systems as well as
starting the daemons.

X-Gentoo-Bug: 508574
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=508574
2014-10-16 16:41:02 -05:00
Rick Farina (ZeroChaos)
ad770d739c localmount: unmount aufs branches 2014-10-06 16:24:44 -05:00
William Hubbs
e860b7cb4f Revert "sysfs: fix permissions on cgroup mounts"
This reverts commit 7a25491ced.
This was broken; I need to look further into it.
2014-09-16 17:44:30 -05:00
William Hubbs
7a25491ced sysfs: fix permissions on cgroup mounts 2014-09-16 15:14:12 -05:00
Joe M
d032b17897 savecache: check permissions on the correct directory 2014-08-29 09:10:58 -05:00
William Hubbs
4f4f00d612 cgroups: fix cgroup subsystem mounting
Originally, we aborted all of the cgroup setup if /sys/fs/cgroup/openrc
was already mounted. This  caused an issue in lxc containers, so we
should always allow the subsystems to be mounted.

X-Gentoo-Bug: 520606
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=520606
2014-08-22 14:01:20 -05:00
William Hubbs
c60ef5c381 mtab: add verbose level deprecation warnings 2014-08-17 11:23:52 -05:00
William Hubbs
645f7b6947 adjust deprecation schedule for mtab
- Quiet the deprecation messages forr now
- update the feature removal schedule to reflect that it will be removed
  in 2.0.
2014-08-16 15:07:48 -05:00
William Hubbs
1b26d547a5 Deprecate the mtab service script
The mtab service script is no longer needed on modern Linux systems, so
we can remove it in 1.0. However, we need to set a deprecation notice
first.
2014-08-14 13:50:48 -05:00
William Hubbs
7b744befac bootmisc: do not run the clean_run function in an LXC container 2014-08-10 17:15:05 -05:00
William Hubbs
d29db70efb sysctl.linux.in: use the --system option
According to the sysctl man page, the --system option causes sysctl to
process all system configuration files, which include the following:

/run/sysctl.d/*.conf
/etc/sysctl.d/*.conf
/usr/local/lib/sysctl.d/*.conf
/usr/lib/sysctl.d/*.conf
/lib/sysctl.d/*.conf
/etc/sysctl.conf

X-Gentoo-Bug: 484796
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=484796
2014-08-09 12:35:04 -05:00
William Hubbs
6a337ff6c5 devfs: several small clarifications
- Rename the static_dev switch in conf.d/devfs to skip_mount_dev since
  this is a better description of what the switch does.

- Clarify the error messages in the devfs service script based on the
  new name of the switch.
2014-08-08 14:49:00 -05:00
William Hubbs
e3bfb68aec hwclock: always set the kernel's timezone
The hwclock service should set the time zone regardless of the setting
of the clock_hctosys variable. This needs to be done to prevent issues
when the system time is being synchronized using ntp.

X-Gentoo-Bug: 434410
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=434410
2014-07-24 17:40:14 -05:00
Jason Zaman
1a1d53335b devfs: fix restorecon ebegin message to match sys
X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16 18:22:33 -05:00
Jason Zaman
99939b9839 sysfs: restorecon after mounting /sys
X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16 18:21:59 -05:00
Jason Zaman
525d7140b1 devfs: fix SELinux contexts
SELinux contexts in /dev need to be fixed after it is mounted

X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16 11:58:11 -05:00
William Hubbs
25c229cf83 sysfs.in: fix indentation 2014-07-14 15:58:50 -05:00
William Hubbs
57b9e601a9 init.d/local: bring functioning more in line with how sysctl works
- remove the has_executables variable since it isn't used.
- Convert the conditional calls to ewend/vewend to a single call to veend.
- Always call eend after all scripts are executed passing the appropriate
error code.

Because of this change, you will see only an overall status when
starting or stopping local unless you are using verbose mode.
2014-07-09 15:33:48 -05:00
Thomas D
c1de8c09bf Add support for verbose "local" service runscript
With this patch, the "local" service runscript will be verbose like the
"sysctl" service when 'rc_verbose="yes"' is set.

Example output successful start:

 * Stopping local ...
 *   Executing "/etc/local.d/00will-stop.stop" ...                  [ ok ]
 * Starting local ...
 *   Executing "/etc/local.d/00will-start.start" ...                [ ok ]
 *   Executing "/etc/local.d/01 test.start" ...                     [ ok ]

Example output with failing executables:

 * Stopping local ...
 *   Executing "/etc/local.d/00will-stop.stop" ...                  [ ok ]
 *   Executing "/etc/local.d/will-fail.stop" ...
mount: can't find foo in /etc/fstab
 *   Execution of "/etc/local.d/will-fail.stop" failed.             [ !! ]
 * Starting local ...
 *   Executing "/etc/local.d/00will-start.start" ...                [ ok ]
 *   Executing "/etc/local.d/01 test.start" ...                     [ ok ]
 *   Executing "/etc/local.d/will-fail2.start" ...
mount: can't find bar in /etc/fstab
 *   Execution of "/etc/local.d/will-fail2.start" failed.           [ !! ]
 *   Executing "/etc/local.d/will-fail.start" ...
mount: can't find foo in /etc/fstab
 *   Execution of "/etc/local.d/will-fail.start" failed.            [ !! ]

X-Gentoo-Bug: 489274
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=489274
2014-07-05 13:12:30 -05:00
Kaarle Ritvanen
143f1c64c1 sysctl.Linux.in: remove -lxc from keywords
certain tunables can be set independently for each container

X-Gentoo-Bug: 516050
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516050
2014-07-04 08:33:55 -05:00
William Hubbs
56112a6f1f sysfs: Do not mount openrc cgroup if it is already mounted
We were not checking to see if /sys/fs/cgroup/openrc was already mounted
before we mounted it. This fixes that issue.
Thanks to Robin Johnson <robbat2@gentoo.org> for pointing this out.
2014-06-30 20:30:39 -05:00
Sven Vermeulen
6126700a07 SELinux filesystem is at /sys/fs/selinux
The SELinux filesystem has been moved to /sys/fs/selinux for quite some
time. We kept supporting /selinux for backwards compatibility, but it's
time to move forward on this.

X-Gentoo-Bug: 511718
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=511718
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2014-06-20 18:37:33 -05:00
Andrew Gregory
20d7b83150 tmpfiles.dev: remove --remove option
For compatibility with systemd.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-04-03 12:39:27 -05:00
Andrew Gregory
686ee62a79 tmpfiles: add support for --boot option
For compatibility with systemd-tmpfiles.

Fixes #17

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-03-27 11:36:41 -04:00
Mike Frysinger
4ee8e90ffe devfs: explicitly mount /dev/shm with mode=1777
The current code relies on the tmpfs mount defaulting to 1777
permissions.  If it doesn't, things break badly.

This can come up when tmpfs is disabled in the kernel and ramfs
is being used instead (the kernel will alias tmpfs to ramfs).
The default permissions for ramfs is 0755.
2014-01-23 12:01:53 -06:00
William Hubbs
561b53ef09 bootmisc: Remove console directories only if $RC_LIBEXECDIR is writable
X-Gentoo-Bug: 489368
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=489368
2014-01-15 10:43:52 -06:00
William Hubbs
8352082eb6 devfs: add code to mount /dev
All Linux systems need /dev to be set up,so add code to devfs to do
this. The process devfs follows is below.

1. If static_dev is yes, nothing is done.
2. if /dev is an entry in fstab it is mounted or remounted based on that
entry.
3. If /dev is not in fstab, it attempts to mount /dev as a devtmpfs or
   tmpfs depending on which is defined in the kernel; devtmpfs is
   preferred.
4. If neither devtmpfs nor tmpfs is defined, it assumes the user wants
static /dev and prints a warning.

X-Gentoo-Bug: 492694
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=492694
2014-01-05 11:17:05 -06: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
Petre Rodan
235f94c4c5 bootmisc.in: fix boot order
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
2013-12-08 12:42:31 -06:00
Andrew Gregory
d711663189 network.in: skip loopback device
The loopback interface is supposed to be handled by the loopback
service, but sys_interfaces includes it.  This causes network to try to
start it and means that network provides net even if lo is the only
interface configured.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2013-12-06 13:24:58 -06:00
William Hubbs
60d288a877 remove type command
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.
2013-12-02 02:08:40 -06:00
William Hubbs
579838d2e7 bootmisc: do not run clean_run on VSERVER systems
X-Gentoo-Bug: 489370
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=489370
2013-10-28 15:21:50 -05:00
William Hubbs
9238d94d64 loopback: do not run in a prefix or vserver
X-Gentoo-Bug: 489370
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=489370
2013-10-28 12:37:22 -05: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
Alexander V Vershilov
66970394ab Add uml keyword to fsck service.
Fix relevant an issue mentioned by Toralf Förster.

X-Gentoo-Bug: 481096.
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=481096
2013-10-14 17:05:19 -05:00
William Hubbs
4b37d3b16f netmount: add -lxc keyword
Netmount should not run on lxc, thanks to Mark van Dijk <funtoo@internecto.net>.
2013-10-08 10:34:45 -05:00
Daniel Robbins
e6df76a377 FL-786: localmount: support filesystem mounting on openvz 2013-10-04 15:16:05 -05:00
William Hubbs
4ce3cb90a0 init.d: update ignore patterns
Remove net.lo* from the ignore pattern since these scripts are no longer
part of OpenRC and add loopback and tmpfiles.dev.
2013-09-01 16:30:18 -05:00
William Hubbs
838c9efb36 Remove gentoo's net.* scripts
It has been determined that it will be best for gentoo's net.* scripts
to be in a separate package to allow independent development.
This package will be called netifrc and maintained by Gentoo.
2013-08-13 16:33:41 -05:00
Fedja Beader
6b0ffd3103 Fix Permission Denied on reading dmesg in an LXC container 2013-08-06 00:27:30 +02:00
Alexander V Vershilov
1c94d793c0 devfs: Add -lxc keyword
Devfs is not needed for LXC, as LXC mounts all required fs on
it's own. Reported by specing.
2013-07-31 12:40:56 -05:00
William Hubbs
e942e88b8c swapfiles: do not try to unmount all tmpfs mounts
This is handled in the swap script, so it should not be done here as
well.

X-Gentoo-Bug: 477534
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=477534
2013-07-26 12:15:29 -05:00
William Hubbs
35f2f1ec73 Introduce the tmpfiles.dev service
This service handles setting up the tmpfiles entries for the /dev
directory for Linux systems which needs to be run in the sysinit
runlevel.
2013-07-25 13:53:44 -05:00
Robin H. Johnson
02a7d3573d efivarfs: Support EFI variable access in 3.10 kernels.
In the 3.10 kernel, EFI variables are now provided by a dedicated
filesystem that needs to be mounted.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2013-06-24 15:42:56 -05:00
Eugeny Shkrigunov
10eabd4d92 fsck: fix typo
X-Gentoo-Bug: 467158
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=467158
2013-04-27 10:26:37 -05:00
William Hubbs
56f1752ce1 create loopback service
The loopback service handles the basic settings for the loopback
interface, regardless of the network manager you are using.
2013-04-08 12:46:51 -05:00