Commit Graph

46 Commits

Author SHA1 Message Date
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
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
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
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
66970394ab Add uml keyword to fsck service.
Fix relevant an issue mentioned by Toralf Förster.

X-Gentoo-Bug: 481096.
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=481096
2013-10-14 17:05:19 -05:00
Eugeny Shkrigunov
10eabd4d92 fsck: fix typo
X-Gentoo-Bug: 467158
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=467158
2013-04-27 10:26:37 -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
Mike Frysinger
2c60282ba9 fsck: simplify skiplist setup
Use printf rather than a manual for loop.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-18 00:24:02 -05: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
0571a7e05b init.d/fsck: only check local file systems
On linux systems, fsck was not taking into account which filesystems
were local or remote. This commit adds the -t option, with an
appropriate value, to the fsck call so that remote file systems are not
checked.

reported-by: Vladimir Berezhnoy <non7top@gmail.com>
X-Gentoo-Bug: 408363
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=408363
2012-03-29 11:44:12 -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
3baca9a35c fsck: fix typo in fsck mount point support
Previous commit e3b39a677b missed adding a "[" to one of the tests.

Reported-by: Torsten Veller <tove@gentoo.org>
x-Gentoo-Bug: 391941
x-Gentoo-Bug-URL: http://bugs.gentoo.org/391941
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-26 03:21:21 -05:00
William Hubbs
815952a65a Revert "Revert "fsck: add the ability to specify mount points to check""
This reverts commit 5a3599df8a.

After review, I am bringing this back to the tree.
2011-11-22 12:56:29 -06:00
William Hubbs
5a3599df8a Revert "fsck: add the ability to specify mount points to check"
This reverts commit e3b39a677b.

I misunderstood and thought this was ready to go in the tree, but it was
on a remote branch only for a review.
2011-11-06 22:06:58 -06:00
Robin H. Johnson
e3b39a677b fsck: add the ability to specify mount points to check 2011-11-06 13:58:48 -06:00
Mike Frysinger
9f95878bbd fix random typos
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-16 19:02:21 -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
Roy Marples
1d174cc60c Move on_ac_power to a shell script.
Fixes #204
2009-12-10 22:30:56 +00:00
Roy Marples
d29daf3952 fsck only checks battery when requested, which is not by default.
This fixes having JFS as the root partition on battery power.
For most modern FS's this is a non op, or a very small op by default
so it should be fine.
Fixes Gentoo #291654.
2009-11-10 22:50:48 +00:00
Roy Marples
95ee39ab1c Add support for Linux Containers, fixes #202.
Patch by bug reporter.
2009-11-04 19:21:24 +00:00
Semen Maryasin
aaa0498bf8 EeePC 901 has /proc/acpi/ac_adapter/AC0, so check all AC entries. 2009-10-12 08:21:50 +01: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
1b3a413673 Skip sysctl errors 2009-05-29 22:08:47 +01:00
Roy Marples
a685e4db0a Add FreeBSD support for AC power. 2009-05-29 21:33:44 +01:00
Roy Marples
e689f17933 Support NetBSD envstat for working out if on AC power. 2009-05-29 21:19:31 +01:00
Roy Marples
fa9e482a31 If not running on AC power don't run fsck to preserve battery life. 2009-05-29 21:06:59 +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
0b12faed7f We should abort boot on some errors. 2009-03-16 21:41:23 +00:00
Roy Marples
2464f9e93b Add parens, #134 thanks to Matthias Schwarzott. 2008-12-29 23:06:22 +00:00
Roy Marples
d91201cb94 Skip all forcefsck checking when stopping, #134. 2008-12-28 15:25:40 +00:00
Roy Marples
1c5ec9d161 Fake get_bootparam function so that we don't check for kernel options forcefsck when doing an fsck on shutdown. 2008-12-28 14:49:07 +00:00
Roy Marples
cc14b55414 Now the linx fsck man page has return codes, I find them different from the BSD's so adjust accordingly. 2008-11-04 07:45:05 +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
27805de20a Allow forcefsck on the kernel command line, Gentoo #218431 2008-09-22 12:32:11 +00:00
Roy Marples
3a592fa31b Trap fsck for SIGINT as well, so user can ctrl-C to abort fsck and continue, Gentoo #223473. 2008-05-27 10:25:29 +00:00
Roy Marples
08081f7ef4 Fix passno and IFS, #77 and #85, thanks to Nahor 2008-05-25 22:30:31 +00:00
Roy Marples
2bda1871a1 When fsck_passno is set, show this so output is clearer when fsck is multiplexed, Gentoo #218141. 2008-04-22 13:46:53 +00:00
Roy Marples
c89b3763fb Respect shutdown -F on Linux to force fsck, #59 2008-04-17 00:09:34 +00:00
Roy Marples
0e114abf5d Respect shutdown's fastboot. 2008-04-09 00:21:49 +00:00
Roy Marples
d9ec62b22a Add rc-service and update all softlevel refs to runlevel. 2008-03-19 17:11:50 +00:00
Roy Marples
fb85a0833f Fix fsck progress bar. 2008-03-04 16:58:26 +00:00
Roy Marples
15cf41e713 Split VPS into VSERVER and OPENVZ 2008-03-03 17:19:56 +00:00
Roy Marples
67c5fd6bb8 Ensure that our scripts call prefixed runscript. 2008-03-02 21:14:01 +00:00
Roy Marples
a12dbdc6c9 Don't check for root in prefix. 2008-03-02 21:13:21 +00:00