Commit Graph

520 Commits

Author SHA1 Message Date
William Hubbs
3100114bc1 Add nfsclient to netmount use dependencies
X-Gentoo-Bug: 537996
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=537996
2015-02-03 10:54:57 -06:00
Consus
8250ac94df tmpfiles.*: Follow OpenRC's message style
Just to be consistent.
2015-01-24 13:36:48 -06:00
William Hubbs
3c5dc0ec77 tmpfiles.dev: pass --boot to tmpfiles.sh so kmod works properly 2015-01-18 09:13:43 -06:00
William Hubbs
30cc3cdb76 Make sysfs behave like netmount and localmount
sysfs now mounts all related sysfs file systems and returns success,
like netmount and localmount.

Also, we now check to make sure the cgroups are not mounted before we
mount them.

X-Gentoo-Bug: 530138
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=530138
2014-11-23 21:39:20 -06:00
William Hubbs
3fad31a994 init.d: add osclock to ignore patterns 2014-11-20 11:25:48 -06:00
William Hubbs
8d0ca13fbd devfs: optionally add missing symbolic links
If symbolic links for /dev/{fd,stdin,stdout,stderr,core} do not exist
once /dev is mounted, we should create them.
2014-11-20 10:55:53 -06:00
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