Commit Graph

47 Commits

Author SHA1 Message Date
William Hubbs
6b475ab269 init.d/modules: add code from modules-load service
There is no reason for these to be separate services. I did add a
provide so that we don't break backward compatibility.
2018-03-16 14:33:01 -05:00
William Hubbs
3de6395ae3 split cgroups mounting out of sysfs
This is neceessary to allow cgroups to be mounted in an lxc/lxd
container.

Fixes https://github.com/openrc/openrc/issues/187
2017-11-28 17:14:33 -06:00
i.Dark_Templar
79a9edc730
Fix make install on FreeBSD: don't try to install /etc/init.d/modules twice 2017-04-05 16:54:53 +03:00
William Hubbs
d7bbb0f583 add agetty service
The agetty service is an alternate way to manage gettys with agetty
under Linux which is separate from an external init system.
2017-03-09 15:23:02 -06:00
William Hubbs
e0ac661419 split tmpfiles processing into opentmpfiles
The openntmpfiles package is designed so that it can be used on systems
independently of whether openrc is used.
2016-12-01 12:04:54 -06:00
William Hubbs
d06db93d59 remove swapfiles service
The swapfiles service was basically a copy of the swap service, so this
commit consolidates the functionality into the swap service.

X-Funtoo-Bug-URL: https://bugs.funtoo.org/browse/FL-2523
X-Gentoo-Bug: 568162
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=568162
2016-09-05 13:39:51 -05:00
William Hubbs
556dbff99d Add modules-load.d support 2016-08-25 12:08:44 -05:00
William Hubbs
f62253b833 Add support for runit
X-Gentoo-Bug: 501364
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=501364
2016-07-27 16:26:26 -05:00
William Hubbs
daf9397764 init.d: combine sysctl scripts
We had separate sysctl scripts for each operating system. However, there
is no need to do this since we can detect the operating system at
runtime with $RC_UNAME.
2016-07-19 16:21:48 -05:00
William Hubbs
314ae3dc78 modules: add support for FreeBSD
This is based on a patch submitted by
Joe Maloney <pkgdemonteam@gmail.com>.

This fixes #91.
2016-07-18 17:09:41 -05:00
William Hubbs
960881fcfe Add net-online service 2015-10-20 12:13:47 -05:00
William Hubbs
bb2d7becfd Add support for the s6 supervision suite 2015-05-11 18:36:49 -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
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
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
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
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
William Hubbs
1a8cd5ff9d Tmpfiles: create and delete entries once in the boot runlevel.
Initially, we were creating tmpfiles entries in the sysinit runlevel and
again in the boot runlevel. Systemd runs the --create and --remove
options in one service called systemd-tmpfiles-setup after the local
file systems are mounted. Now we have a service called tmpfiles.setup
which emulates this.

This also closes the bug mentioned below, since we were originally
writing to files that were on read-only file systems and that were not
available.

Reported-by: <devurandom@gmx.net>
X-Gentoo-Bug: 439012
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439012
2012-10-31 17:33:14 -05:00
Robin H. Johnson
4ff71bd741 tmpfiles.d init.d scripts
Now that the tmpfiles.d code is more tested, actually call it from
init.d. It assumes that /run is already available when it runs.

Please note it runs TWICE.
- During sysinit, ideally just after /dev/shm is created, but before
  udev has started. After udev is also acceptable, but not ideal.
- During boot, ideally just after localmount has completed.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-09-26 15:42:37 -07:00
Richard Yao
0730ac61e8 Import encswap init script from FreeBSD
The FreeBSD encswap init script has been adapted to function in OpenRC. It
should function identically to its FreeBSD counterpart.
2012-07-15 13:57:57 -05:00
William Hubbs
006fbdce83 fix the upstream default network stack
The OpenRC upstream default network stack was changed, but there was no
reason to change it. Now since we have the MKNET build switch, it is
easy for the gentoo ebuild to install oldnet by default.

The upstream default is newnet.
2012-07-10 12:18:06 -05:00
William Hubbs
60d6847de5 add the MKNET variable to select a network stack
The MKNET variable can be used to select the network stack you want to
build and install with OpenRC.

The current default is the gentoo "oldnet" stack. If you want to install
the OpenRC newnet stack, use MKNET=newnet on the make command line.
2012-07-10 02:39:36 -05:00
William Hubbs
3e2018f5e9 Revert "Deprecate the network and staticroute scripts"
This reverts commit 5994e55937.
There are situations where these scripts can be useful, so I am bringing
them back. Also, I want to start discussions about simplifying the
OpenRC network stack.
2012-07-08 19:51:36 -05:00
William Hubbs
79d6f10926 Improve swap handling
Modify the swap script so it starts before and stops after localmount.
Also, on linux, this script should skip mounting swap on loopback.

Add a swapfiles script which runs after localmount and is designed to
activate additional swap space which could not be activated before
localmount was run. This includes loopback swap on linux and swapfiles
which are on local file systems that were not mounted when swap was
activated initially.

The start code does reactivate swap that is already active, but this is
not an error condition.

Reported-by: Giampaolo Tomassoni <giampaolo@tomassoni.biz>
X-Gentoo-Bug: 401003
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401003
2012-02-13 08:35:29 -06:00
William Hubbs
5adb3930c7 Integrate migrate-run into bootmisc
The migrate-run service was hanging when parallel startup was enabled
because of its dependencies. This integrates the logic for this service
into bootmisc, which will avoid the issues with parallel startup.

I would like to thank Robin H. Johnson <robbat2@gentoo.org> for his
input on this patch
2011-12-03 12:46:52 -06:00
William Hubbs
17a1529416 Migrate /var/lock and /var/run to /run for linux systems 2011-11-23 07:26:05 -06:00
William Hubbs
5994e55937 Deprecate the network and staticroute scripts
These scripts are not supported, and they have several major design
issues such as not being able to stop, start or allow a dependency on a
single interface.
2011-11-16 13:29:52 -06:00
William Hubbs
5066d40ac8 Use pattern rules instead of suffix rules
Rework the makefiles to use pattern rules instead of suffix rules.
This is the preferred way to write implicit rules according to the gnu
make manual.
2011-10-29 09:43:24 -05:00
Mike Frysinger
9a539ebbe1 further clean up OS differences in makefiles
No need for if() logic.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-20 14:32:37 -05:00
William Hubbs
ecf77254bb consolodate Makefiles
The tree contained many operating system specific Makefiles which were
being included in other Makefiles. This commit removes those and adds
the code to the makefiles which included them using make's conditional
processing.

X-Gentoo-Bug: 387441
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=387441
2011-10-18 03:23:00 -05:00
William Hubbs
19037cbd83 remove unnecessary shell calls
The main makefile, init.d/Makefile and src/librc/Makefile all contain
several shell calls which can be handled as make conditionals. This
switches them to conditionals.
2011-02-04 17:46:57 -06:00
William Hubbs
cca7e9f7e1 use immediate evaluation for shell calls
This reworks the shell calls in the makefiles to use immediate
evaluation and should improve parallel building.

X-Gentoo-Bug: 289264
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=289264
2011-01-31 14:05:57 -06:00
Roy Marples
baeb59cd2e Add a new staticroute init script so that .... static routes can be configured!
Fixes Gentoo #288421.
2009-10-16 08:08:22 +01:00
Roy Marples
a8f6a9b654 Add new utility and init script swclock that sets the system time based on
the mtime of a file. It saves the shutdown time to this file also.
This is handy for systems without a working RTC chip.
Based on an idea by Michael A. Smith <michael@smith-li.com>.
Fixes Gentoo #272073.
2009-10-13 08:03:45 +01:00
Roy Marples
371506be48 Default to not building the old net scripts. 2009-04-19 20:54:11 +00:00
Roy Marples
d4c71415a9 Add MKOLDNET=yes/no toggle 2009-04-17 23:23:31 +00:00
Roy Marples
6027b0ed7d Add a new init script - network
This simply assigns static addresses and an optional default route.
It's possible to add external commands as well, so to create a bonded interface.

Hopefully we can add a few examples to satisfy most of the old net.lo, which
is no longer installed into boot by default.
2009-04-16 23:47:23 +00:00
Roy Marples
0af7d5bc20 Add a new shutdown runlevel, Gentoo #224537.
Split halt.sh into halt, killprocs, romount and savecache services.
The reboot runlevel is removed but mapped to shutdown.
The halt script should be moved to the sysvinit package.
2008-11-03 15:31:01 +00:00
Roy Marples
c8248d05a0 Ensure that make dep ordering is correct for install. 2008-05-06 19:52:30 +00:00
Roy Marples
5ba6f0a628 We need to ensure that the init script started is correct, translating symlinks. This has a new rule - multiplexed services must exist in the same dir as the master sript. So we need to ensuret that net.lo(0) is the real script and not a symlink itself. This fixes Gentoo #219526. 2008-04-29 10:25:45 +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
Roy Marples
a689b66023 Add tunable SYSCONFDIR 2008-03-05 12:27:11 +00:00
Roy Marples
61c476e72d Use exlicit make targets, not directory contents. 2008-03-03 12:34:51 +00:00
Roy Marples
4314784520 Allow for OS and SUBOS folders so we can introduce NetBSD scripts whilst keeping BSD for all BSD's. 2008-01-10 16:35:59 +00:00
Roy Marples
9635b455c7 Introduce CONTENTS variable into Makefiles to list the contents of the directory, excluding the Makefile for to Make life easier 2007-11-20 17:37:15 +00:00
Roy Marples
5f8cf73b22 Our build chain now works with GNU and BSD make implementations 2007-11-19 13:48:43 +00:00
Roy Marples
5af58b4514 Rewrite the core parts in C. We now provide librc so other programs can
query runlevels, services and state without using bash. We also provide
libeinfo so other programs can easily use our informational functions.

As such, we have dropped the requirement of using bash as the init script
shell. We now use /bin/sh and have strived to make the scripts as portable
as possible. Shells that work are bash and dash. busybox works provided
you disable s-s-d. If you have WIPE_TMP set to yes in conf.d/bootmisc you
should disable find too.
zsh and ksh do not work at this time.

Networking support is currently being re-vamped also as it was heavily bash
array based. As such, a new config format is available like so
config_eth0="1.2.3.4/24 5.6.7.8/16"
or like so
config_eth0="'1.2.3.4 netmask 255.255.255.0' '5.6.7.8 netmask 255.255.0.0'"

We will still support the old bash array format provided that /bin/sh IS
a link it bash.

ChangeLog for baselayout-1 can be found in our SVN repo.
2007-04-05 11:18:42 +00:00