Commit Graph

40 Commits

Author SHA1 Message Date
Mike Frysinger
301161a7a4 use HEAD in git URIs to point to the default branch
This makes the URIs shorter and dynamic: whatever the default branch
the repo uses will be used.
2021-12-20 20:07:00 -05:00
William Hubbs
a3d0e293ee Remove localmount from dependencies for linux-only services
This removes localmount from the dependencies of the consolefont,
keymaps, numlock and procfs services.

These services are Linux only and the default modern linux system has /
and /usr on the same file system.

This also fixes the following issue.

X-Gentoo-Bug: 651998
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651998
2018-05-07 18:12:55 -05:00
William Hubbs
4f750933fd procfs: remove the @sysconfdir@ reference 2017-12-14 17:31:57 -06:00
William Hubbs
9bd63b5d4a update dependencies for clock service
The clock services had a very long list of "before" dependencies that
referred to other services within OpenRC. For ease of maintenance,
convert these to "after clock" dependencies in the individual services.
2017-03-16 10:16:39 -05:00
Doug Freed
61882821e0 init.d: Clean up some bad ewarn output 2016-09-28 15:00:40 -04:00
William Hubbs
6bd0f2d096 init.d/procfs: typo fix 2016-09-12 12:58:01 -05:00
William Hubbs
ba10793b0b init.d/procfs: fix binfmt_misc module load warning
This reworks the logic so that the warning about configuring the
binfmt_misc module is only displayed if the module actually has to be
loaded.
2016-09-08 11:53:20 -05:00
William Hubbs
73cdf10f1f Deprecate automatic loading of modules
In the hwclock, procfs and sysfs service scripts, we automatically
attempt to load the kernel modules we need before we take any action. We
shouldn't do this, because there are systems which do not use kernel
modules and do not have the kmod package installed.

With this change, we continue to load the modules ourselves, but we warn
the admin that they need to be added to /etc/conf.d/modules or built
into the kernel.

In the future, this automatic loading will be dropped.

X-Gentoo-Bug: 342313
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=342313
2016-08-19 11:08:27 -05:00
William Hubbs
da28a3d367 init.d: initial service adjustments for docker support
Add -docker keyword to the same scripts that have -lxc keyword.
2016-07-31 13:01:17 -05: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
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
William Hubbs
ee1768a419 Add binfmt service to sysinit runlevel
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
2015-04-20 17:10:07 -05:00
William Hubbs
95ed066539 procfs: do not force loading of usbcore module
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
2015-04-20 11:02:01 -05:00
William Hubbs
4c5132421f procfs: remove usbfs and usbdevfs support
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
2015-04-20 10:59:47 -05:00
William Hubbs
6d81d3be1b procfs: do not test for the existence of /proc/filesystems
The test for the existence of /proc/filesystems is redundant since we
always return success.
2015-04-19 13:59:12 -05:00
William Hubbs
8d307a6fad procfs: remove redundant check for OpenVZ
The check for OpenVZ is not necessary since the procfs service already
will not run on OpenVZ due to the keywords setting.
2015-04-17 14:15:59 -05:00
William Hubbs
62addf1180 Move SELinux mount to sysfs service
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
2015-04-14 11:41:17 -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
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
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
Andrew Gregory
89bb04a01a do not use SYSCONFDIR for binfmt.d
This makes binfmt.d consistent with tmpfiles.d and systemd which uses
hard coded paths for both.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2013-02-16 20:46:34 -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
Sergei Trofimovich
4943ddcb1c init.d/procfs: posix compatibility fix
I've noticed in at boot:
    # /etc/init.d/procfs restart
    procfs         | * WARNING: you are stopping a boot service
    procfs         |[: 308: unexpected operator

Which calls
    $ /bin/dash -c '[ "$RC_SYS" == "OPENVZ" ] && echo "ovz" || echo "nope"'
    [: 1: unexpected operator
    nope

Fixed by using '='.

X-Gentoo-Bug: 412237
x-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=412237
2012-04-16 13:45:59 -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
a5509d6819 Enable binfmt_misc for openvz containers
Reported-by: Daniel Robbins <drobbins@funtoo.org>
X-Gentoo-Bug: 401875
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401875
2012-02-16 14:05:04 -06:00
William Hubbs
0c866e1a31 Replace hard coded reference to /etc with @SYSCONFDIR@
I found a reference to "/etc" in the procfs script. This changes that
reference to @SYSCONFDIR@.
2012-02-16 13:59:47 -06:00
Mike Frysinger
fb485366e6 procfs: simplify the binfmt_misc mount check
Replace the `mountinfo` exec with a file test of the register file
which we rely on later anyways.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-09-18 16:01:28 -04:00
Mike Frysinger
f52dca6984 procfs: drop nfsd mounting
The dedicated nfs init.d script takes care of mounting this when
necessary, and we want it there since mounting it isn't terribly
useful if you can't actually start up the nfs daemons (which the
nfs-utils package provides).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-09-18 16:01:28 -04:00
Mike Frysinger
47d305d2af procfs: load config files from binfmt.d into /proc/sys/fs/binfmt_misc/register
This is a KISS version.  Let's see where we go from here in terms of
complexity.  Maybe nowhere!

X-Gentoo-Bug: 382723
X-Gentoo-Bug-URL: https://bugs.gentoo.org/382723
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-09-18 16:01:26 -04: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
Anthony G. Basile
ac56ab7f6d Check for /sys/module/usbcore before modprobe usbcore
The use of /proc/bus/usb to mount usbfs has been deprecated, but
the option is still available in the kernel.  The new approach is
to use /sys.  We should not modprobe usbcore if either /proc/bus/usb
or /sys/module/usbcore exist.

X-Gentoo-Bug: 363551
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=363551
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2011-04-17 09:12:20 -04:00
Mike Frysinger
ecf9ef49a7 random spelling fixes
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-08 22:02:51 +00: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
Charlie
9c5faf231c procfs should use modules. 2009-05-11 15:31:52 +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
d6da8e8c48 sysinit is now a real runlevel that handles things like udev, dmesg and
mounting various bits in /dev and /sys.
init.sh JUST mounts /lib/rc/init.d (and /proc for Linux systems)
To make development of this easier we now return an empty RC_STRINGLIST
instead of a NULL for empty things.

If you don't have a udev init script installed, don't reboot your box OR
roll back to an older OpenRC version.
2008-10-10 08:37:21 +00:00
Roy Marples
d3b111bd58 Our init scripts normally output context in [ .. ] 2008-04-22 08:12:26 +00:00
Roy Marples
55eb3794fb Rework our folder structure so that we don't have OS specific dirs, making it easier to share init and conf files per OS. 2008-03-25 14:06:05 +00:00