Commit Graph

2643 Commits

Author SHA1 Message Date
William Hubbs
935252b115 Add note about removing rc_sys() from librc 2015-12-08 13:11:41 -06:00
William Hubbs
0d202b5711 Update feature-removal-schedule wrt mtab service 2015-12-08 13:02:26 -06:00
William Hubbs
f9bdb072e8 rc.map: remove references to rc_sys_v{1,2} 2015-12-08 12:50:47 -06:00
William Hubbs
9f6e05671d Convert rc_sys() calls to detect_container() and detect_vm() 2015-12-08 12:09:33 -06:00
William Hubbs
8addd7913a Create detect_container() and detect_vm() functions
These functions replace rc_sys so that we can detect containers and vms
separately.

Also, we copy file_regex() to rc-misc.c and open it to all operating
systems.
2015-12-08 12:05:59 -06:00
William Hubbs
83cd7145e3 Rename bootlevel variable in _usage.c
In src/rc/_usage.c, we were using bootlevel as the variable to hold the
return value of rc_sys.
This changes the variable name to systype because this function returns
a system type, not a runlevel.
2015-12-05 17:47:47 -06:00
William Hubbs
a67e3495d0 Increment version number 2015-12-05 10:31:39 -06:00
William Hubbs
a1acdeb92e update ChangeLog 2015-12-04 13:50:21 -06:00
William Hubbs
b810473e4f man/openrc-run.8: Clarify documentation on dependencies and keywords
Provide an example of using the -containers keyword and clarify
documentation on some of the dependency functions.
2015-12-03 17:37:38 -06:00
William Hubbs
627e925463 add support for -containers keyword 2015-12-03 16:52:15 -06:00
William Hubbs
f5cf1136e7 Use systype variable for rc_sys call 2015-12-02 15:44:35 -06:00
William Hubbs
a4038e1171 rc.conf.Linux: document the rkt keyword 2015-12-02 11:11:45 -06:00
William Hubbs
a0cf8f9124 Add detection for rkt containers 2015-12-02 10:20:39 -06:00
William Hubbs
9fedb3b40b Add detection for docker containers 2015-12-02 10:20:15 -06:00
William Hubbs
635e33cdc8 librc: comsolidate rc_sys_v1 and rc_sys_v2 into rc_sys
These functions were never meant to be used outside of OpenRC, and they
were added when we thought we were going to do away with the automatic
detection of subsystems. Since the autodetection is not going away, we
can combine these functions into rc_sys.
2015-12-01 17:39:04 -06:00
William Hubbs
bd9456ff31 rc-functions.sh: add support for user-defined want dependencies 2015-12-01 12:31:28 -06:00
Ian Stakenvicius
33d3f33b3c Implement "want" dependency
The want dependency is similar to the use dependency. If a service
script, for example called service1, adds "want service2" to its depend
function, OpenRC will attempt to start service2, if it exists on the
system,  when service1 is started.

However, service1 will start regardless of the status of
service2.

X-Gentoo-Bug: 406021
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406021
2015-11-12 12:32:45 -06:00
William Hubbs
ddb895b355 conf.d/netmount: typo fix
X-Gentoo-Bug: 564846
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=564846
2015-11-11 15:48:19 -06:00
Benda Xu
085d77f17e Standardize macro tests for gnu hurd
This also fixes breakage of GNU/hurd builds introduced by commit 3f82edbeb9.
2015-11-11 13:37:41 -06:00
William Hubbs
c831f1f994 librc: rework overriding rc.conf options from the kcl
Rename the rc_conf_override function to describe its purpose better,
drop one conditional compile by making it available everywhere, and move
the call to it after the optional rc.conf.d directory is processed.
2015-11-05 11:20:57 -06:00
William Hubbs
591aea2821 librc: Remove redundant code from rc_config_load 2015-11-05 11:20:57 -06:00
William Hubbs
c09eeca491 Add rc.conf.d support
This makes it possible to override settings in rc.conf by adding a
directory @SYSCONFDIR@/rc.conf.d and putting files in this directory.
The files will be processed in lexical order, and the last setting in
these files will be used.
2015-11-05 10:40:24 -06:00
William Hubbs
4cf6b0ecf7 consolefont: add after modules to dependencies
X-Gentoo-Bug: 559540
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=559540
2015-10-29 11:27:27 -05:00
William Hubbs
ee944553a9 bootmisc: optionally save the previous dmesg log
X-Gentoo-Bug: 561204
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561204
2015-10-21 14:04:28 -05:00
William Hubbs
6cae41a4e6 etc/rc.conf: Clean up documentation for rc_hotplug
X-Gentoo-Bug: 554540
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=554540
2015-10-21 12:49:00 -05:00
William Hubbs
960881fcfe Add net-online service 2015-10-20 12:13:47 -05:00
William Hubbs
d26013494d mtab: typo fix 2015-10-14 17:48:32 -05:00
William Hubbs
b29b2fb3cb mtab: make /etc/mtab as a file configurable 2015-10-14 12:19:13 -05:00
William Hubbs
7da72ce487 openrc-run.sh: fix new required_* tests to exit properly 2015-10-13 17:45:05 -05:00
William Hubbs
fc777aeaf3 typo fix
X-Gentoo-Bug: 563010
X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=563010
2015-10-13 15:51:15 -05:00
William Hubbs
9d53d436ae sysfs: consolidate cgroup processing code in a single function 2015-10-13 15:07:53 -05:00
William Hubbs
b81317bdf8 mountinfo: make sure the netdev variable is initialized on Linux
This fixes the following regression:

X-Gentoo-Bug: 562668
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562668
2015-10-13 08:27:43 -05:00
William Hubbs
29f7e33592 openrc-run.sh: allow spaces in required_{files,dirs}
X-Gentoo-Bug: 562320
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562320
2015-10-13 07:59:50 -05:00
William Hubbs
850ca03077 increment version number 2015-10-08 16:14:34 -05:00
William Hubbs
050ddfae4a Update ChangeLog 2015-10-08 13:33:27 -05:00
William Hubbs
d5116cc697 localmount: white space cleanup 2015-10-08 13:20:14 -05:00
Ian Stakenvicius
b86d170037 localmount: clean up handling of aufs branches
X-Gentoo-Bug: 560008
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=560008
2015-10-08 12:49:09 -05:00
William Hubbs
6fa0d6318b mtab: fix update logic
This advises users to remove mtab from their runlevels if /etc/mtab is a
symlink, and it creates the symlink if /etc/mtab does not exist on a
system.

X-Gentoo-Bug: 560060
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=560060
2015-10-07 11:35:31 -05:00
Austin S. Hemmelgarn
80d3928b0d cgroups: Add the hugetlb, net_cls and pids controllers
Note from WilliamH: I slightly rearranged the code and added the
settings in rc.conf.

X-Gentoo-Bug: 555488
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=555488
2015-10-06 15:05:35 -05:00
William Hubbs
17ef205bc6 sysfs: use printf instead of echo to write to cgroup files
This is needed for compatibility with musl and printf is also posix.

X-Gentoo-Bug: 562334
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562334
2015-10-06 13:31:43 -05:00
William Hubbs
b20a1951ad rc-cgroup.sh: Do not add leading spaces to cgroup values
We were starting the value we write to the cgroup setting file with
leading spaces and this was causing issues. This change makes sure that
we aren't adding leading spaces to the value.

X-Gentoo-Bug: 562354
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562354
2015-10-06 12:11:29 -05:00
William Hubbs
bf0c0dd564 bootmisc: convert errors in clean_run function to warnings
X-Gentoo-Bug: 552418
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=552418
2015-10-05 11:22:08 -05:00
William Hubbs
1558ad2b9e bootmisc: only remove temp directory if umount is successful
Change the clean_run function to only remove the temp directory if the
umount was successful.

X-Gentoo-Bug: 561230
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561230
2015-10-05 11:08:11 -05:00
William Hubbs
5f4f242036 mountinfo: fix --netdev and --nonetdev on Linux
On Linux, the --netdev and --nonetdev switches were not working. They
were both returning false. After this change, they operate based on the
presence or abscence of the _netdev option in mount options.
2015-10-05 10:18:00 -05:00
William Hubbs
b3f7ff901f mountinfo: read /proc/self/mounts instead of /proc/mounts on Linux 2015-10-04 15:35:33 -05:00
William Hubbs
a59365a582 start-stop-daemon.sh: complain in start if command is undefined
The default start-stop-daemon start function expects the command
variable to be defined to point to the daemon we want to start.

If the variable is undefined, this means that there will be nothing to
start, and in this case we should complain because it is possible that
the script writer made a typo in the variable name.
2015-10-02 16:34:15 -05:00
William Hubbs
dac5966ca4 Revert "local/netmount: remove uses of -O [no]_netdev"
This reverts commit 2a439c85bd.
There is another use case for -O involving iscsi, so we can't remove it.
2015-10-01 17:33:43 -05:00
William Hubbs
3b6a6df4b5 openrc-run: rename some dependency variables and a function for clarity
All of the dependency type lists had the types_ prefix in their names;
this has been changed to deptypes_ to make them more self documenting.

Along the same lines, the setup_types function was renamed
setup_deptypes.
2015-09-17 15:02:30 -05:00
William Hubbs
b047ea47e9 localmount/netmount: on Linux, fail if some file systems do not mount
The following return codes are returned by mount -a:

0:  all file systems mounted.
32: no file systems mounted.
64: some file systems mounted.

The localmount/netmount services should fail if all file systems that
should mount did not mount.
2015-09-01 14:41:07 -05:00
William Hubbs
b652752339 Make localmount and netmount always succeed on non-linux 2015-08-21 12:21:31 -05:00