Commit Graph

599 Commits

Author SHA1 Message Date
William Hubbs
deaae7ab5c init.d/sysfs: load efivarfs module when booting in efi mode:1
The presence of /sys/firmware/efi is used to indicate that the system
was booted in efi mode.
2016-10-05 22:48:17 -05:00
William Hubbs
3d2c2f0b87 init.d/sysfs: fix efivarfs module test 2016-10-04 18:18:17 -05:00
William Hubbs
6a0c033a64 init.d/sysfs: fix efivarfs handling
Separate loading the module, if it isn't built in or loaded, from
mounting the file system.

This also makes sure the warning about configuring the module in
/etc/conf.d/modules or building it in is displayed only if it is loaded
successfully.

X-Gentoo-Bug: 595836
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=595836
2016-10-04 12:06:58 -05:00
Doug Freed
61882821e0 init.d: Clean up some bad ewarn output 2016-09-28 15:00:40 -04:00
William Hubbs
0a76627345 init.d/swap: remove the case for linux
I am removing the separate case for Linux, because we are droppping the
"-e" switch.
2016-09-23 14:17:14 -05:00
William Hubbs
bf73363f22 Add --use-blacklist to modprobe calls in modules and modules-load
This means that we will honor the modprobe black lists.

X-Gentoo-Bug: 594012
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=594012
2016-09-20 13:15:39 -05:00
William Hubbs
b02ff466fa savecache: stop saving the dependency tree
This fixes #85.
2016-09-12 12:58:31 -05:00
William Hubbs
6bd0f2d096 init.d/procfs: typo fix 2016-09-12 12:58:01 -05:00
William Hubbs
841b883825 hwclock: fix module load warning 2016-09-08 13:36:13 -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
d5db5489be init.d/swap: do not unmount all tmpfs file systems
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
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
Martin Väth
8c14d0c476 Fix typo in RC_UNAME check of modules-load
The $RC_UNAME "Linux" had been misspelled as "linux".
As a consequence, entries in e.g. /etc/modules-load.d failed to
load any module succesfully under Linux(!)
2016-08-30 19:47:13 +02:00
Doug Freed
c289774b00 modules-load: handle comments better
This handles comments without a trailing space after the comment
character.

Reported-By: josef64
2016-08-26 15:23:54 -04:00
William Hubbs
686e172207 init.d: add modules-load to ignore patterns 2016-08-25 17:04:06 -05:00
William Hubbs
fef6268f8d modules-load.d: cleanups
Move list of directories to a local variable and create the fn variable
to use for an individual file name rather than using path.
2016-08-25 16:12:33 -05:00
William Hubbs
556dbff99d Add modules-load.d support 2016-08-25 12:08:44 -05:00
William Hubbs
4018dfc8de init.d/hostname: do not use localhost as a default hostname
This allows the operating system default hostname to be used if no
hostname is configured.
2016-08-24 13:43:11 -05:00
William Hubbs
353bb9bc9a init.d/hostname: add support for /etc/hostname 2016-08-23 13:22:19 -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
cae3976ef1 init.d: Add runsvdir to ignore patterns 2016-07-31 14:02:30 -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
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
f2c2e2dd5a init.d/sysctl.in: typo fix 2016-07-27 14:09:24 -05:00
William Hubbs
b19d0a40d7 init.d/loopback: remove unnecessary stop function 2016-07-26 11:14:50 -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
ac8ad169ae hwclock: always use --noadjfile if available
When we use the --utc or --localtime switch, also use --noadjfile if it
is available. This means hwclock will not use a drift file.

X-Gentoo-Bug: 584722
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=584722
2016-07-06 10:40:31 -05:00
William Hubbs
92e2f2c7cc killprocs: remove calls to sleep
X-Gentoo-Bug: 487084
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487084
2016-05-05 17:02:39 -05:00
William Hubbs
fd80b6fc67 localmount/netmount: clean up critical mount processing
Fix a typo and do not fail if a path in critical_mounts is not listed as
a critical mount does not get mounted.
2016-04-26 12:43:50 -05:00
William Hubbs
5d130cc45c localmount/netmount: allow mount points to be marked critical
In previous releases, we either treated no mount points as critical or
all of them.

Now both localmount and netmount support a critical_mounts setting. If
mount points listed in this setting fail to mount, localmount and
netmount will fail.
2016-04-25 12:04:34 -05:00
William Hubbs
1c3c2cf6d8 netmount: fix mounting on Linux
Before this commit, on Linux, we were always trying to mount file
systems marked with _netdev, even when the previous mount command
failed. Now, we do not run the second mount if the first fails.

X-Gentoo-Bug: 579876
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=579876
2016-04-15 11:30:44 -05:00
Mike Frysinger
2c1f6a16e1 sysfs: mount pstore when available 2016-02-09 15:39:43 -06:00
William Hubbs
e52b5f59c2 savecache: stop saving nettree
Netifrc is no longer part of OpenRC, so we shouldn't save its dep tree
as part of savecache.

This should have been removed when netifrc was split out. also, it
might be related to the following bug.

X-Gentoo-Bug: 563720
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=563720
2016-01-28 17:06:25 -06:00
William Hubbs
e277ae57ef fix tests
X-Gentoo-Bug: 572602
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572602
2016-01-22 12:07:13 -06:00
William Hubbs
cd7883d25d localmount: Allow users to control whether errors are ignored
X-Gentoo-Bug: 572138
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572138
2016-01-19 13:34:04 -06:00
joe9
9473ac514c allow the user to decide whether fsck aborts for errors
X-Gentoo-Bug: 564008
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=564008
2016-01-13 10:52:22 -06:00
William Hubbs
5d3e85bc31 add ignore patterns for init.d directory 2016-01-01 09:19:49 -06: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
Rick Farina (Zero_Chaos)
c45313dfa9 netmount: use want dependency to start nfsclient
add in parsing of fstab to determine if nfsclient should be automatically
started so that netmount can mount nfs without adding nfsclient
to the default runlevel

This fixes #71.
2015-12-11 13:56:03 -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
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
9d53d436ae sysfs: consolidate cgroup processing code in a single function 2015-10-13 15:07:53 -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
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