Commit Graph

27 Commits

Author SHA1 Message Date
omnivagant
e045591845 init.d/devfs: default mount /dev noexec 2022-01-30 01:53:25 -05:00
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
12ee72a9b3 allow devfs to run on lxc
X-Gentoo-Bug: 761918
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=761918
Closes #272.
2021-01-28 12:32:09 -06:00
William Hubbs
53844fd0dc devfs: cleanup
clean up local definitions. Also remove @SYSCONFDIR@ substitutions since
they can be calculated at runtime.
2017-12-14 12:08:38 -06: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
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
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
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
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
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
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
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
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
William Hubbs
f30eec03ce devfs: Mount the posix message queue file system
Reported-by: reuben.m@gmail.com
X-Gentoo-Bug: 456998
X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=456998
2013-02-14 17:53:53 -06:00
William Hubbs
2a9de2df58 devfs: Remove references to specific device managers
There were references in the devfs script to mdev, udev and
udev-mount. These all provide the virtuals dev and dev-mount; that is
how we should refer to them.

I believe in the discussion I had with Tony and Robin about this, we
were going to change the "use" line to "need". However, after thinking
that over, I'm not comfortable doing so because someone could be running
a static /dev with no device manager.

Reported-by: <tokiclover@gmail.com>
X-Gentoo-Bug: 438932
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=438932
2012-10-19 20:53:46 -05:00
Robin H. Johnson
33c63ede78 init.d/devfs: Run after (u)dev-mount, before udev/mdev
Using the new dev-mount virtual, with udev-mount included until new udev
version is rolled out, we run devfs earlier now, before udev/mdev.
It only needs (u)dev-mount before it, so that /dev is mounted.

This opens the way for tmpfiles.d, which needs to be sandwiched in the
middle.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-09-26 14:34:41 -07: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
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
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
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
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
36c53e7551 Keyword novserver, #137. 2009-01-06 16:25:33 +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