Commit Graph

479 Commits

Author SHA1 Message Date
William Hubbs
579838d2e7 bootmisc: do not run clean_run on VSERVER systems
X-Gentoo-Bug: 489370
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=489370
2013-10-28 15:21:50 -05:00
William Hubbs
9238d94d64 loopback: do not run in a prefix or vserver
X-Gentoo-Bug: 489370
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=489370
2013-10-28 12:37:22 -05:00
William Hubbs
d2988dc7dd remove redundant sync calls
The localmount and mount-ro scripts were flushing pending disk writes by
calling sync twice in succession. This is no longer necessary; see the
bug report and blog post for reasons we were still doing this.

Reported-by: Patrick Lauer <patrick@gentoo.org>
X-Gentoo-Bug: 487382
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487382
2013-10-18 16:32:51 -05: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
William Hubbs
4b37d3b16f netmount: add -lxc keyword
Netmount should not run on lxc, thanks to Mark van Dijk <funtoo@internecto.net>.
2013-10-08 10:34:45 -05:00
Daniel Robbins
e6df76a377 FL-786: localmount: support filesystem mounting on openvz 2013-10-04 15:16:05 -05:00
William Hubbs
4ce3cb90a0 init.d: update ignore patterns
Remove net.lo* from the ignore pattern since these scripts are no longer
part of OpenRC and add loopback and tmpfiles.dev.
2013-09-01 16:30:18 -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
Fedja Beader
6b0ffd3103 Fix Permission Denied on reading dmesg in an LXC container 2013-08-06 00:27:30 +02: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
William Hubbs
e942e88b8c swapfiles: do not try to unmount all tmpfs mounts
This is handled in the swap script, so it should not be done here as
well.

X-Gentoo-Bug: 477534
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=477534
2013-07-26 12:15:29 -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
Robin H. Johnson
02a7d3573d efivarfs: Support EFI variable access in 3.10 kernels.
In the 3.10 kernel, EFI variables are now provided by a dedicated
filesystem that needs to be mounted.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2013-06-24 15:42:56 -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
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
19fa20832c localmount: add "no" in front of network file system types
On Linux, this was not an issue, but we may have been attempting to
mount network file systems twice on *bsd.

Reported-by: powerman-asdf@yandex.ru
x-Gentoo-Bug: 462210
x-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=462210
2013-03-22 14:50:27 -05:00
Yuta SATOH
f1ae8963c9 oldnet: convert netmask to decimal numbers in _netmask2cidr
Free BSD's ifconfig outputs a netmask in the form 0xffffff00, which
was translating to 0xff.0xff.0xff.0x00,. Now we convert this to decimal
numbers before we convert it to cidr notation.

Reported-by: 4glitch@gmail.com
X-Gentoo-Bug: 460268
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=460268
2013-03-08 15:30:36 -06:00
William Hubbs
3b05586a73 ipfw: change opts variable to extra_commands
Reported-by: 4glitch@gmail.com
X-Gentoo-Bug: 459694
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=459694
2013-03-06 12:48:20 -06: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
Andrew Gregory
89bb04a01a do not use SYSCONFDIR for binfmt.d
This makes binfmt.d consistent with tmpfiles.d and systemd which uses
hard coded paths for both.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2013-02-16 20:46:34 -06:00
Andrew Gregory
746bf5f783 consolefont: use setfont to save the current font
Using setfont directly to save the font prevents breakage
when a distro stores consolefonts in a location other than
/usr/share/consolefonts such as Arch which stores them in
/usr/share/kbd/consolefonts

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2013-02-16 19:51:15 -06:00
William Hubbs
1831e433a0 bootmisc: Skip cleaning /var/run or tmp directories if they are tmpfs
Reported-by: walter@pratyeka.org
X-Gentoo-Bug: 454338
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=454338
2013-02-16 02:06:26 -06:00
William Hubbs
86dbd757e9 keymaps: fix the use of loadkeys in the euro fix
The loadkeys man page states that if you don't pass a filename loadkeys
will read from stdin. However, this is not correct, so we now pass "-"
as the filename to explicitly request stdin.

Reported-by: andi@grois.info
X-Gentoo-Bug: 457524
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=457524
2013-02-15 16:09:49 -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
5bfebbecea Rename shutdown_network setting to keep_network
We were telling users that setting shutdown_network=YES would shut down
the network interfaces during shutdown, but this was exactly the
opposite of what we were doing. The default was YES, which was keeping
the interfaces active.

This keeps the default behavior, but renames the setting to keep_network
which more accurately describes its function, and instructs users to set
it to NO if they want the network interfaces to go down.
2013-02-11 09:45:14 -06:00
William Hubbs
1280b97749 oldnet: add support for shutdown_network from newnet
This setting, already in use in newnet, allows the user to control
whether network interfaces are stopped when the system shuts down. By
default, under newnet, they are not, so I am making oldnet have the same
default.

A side-affect of this is that in the default configuration this fixes
bugs like the one below.

Reported-by: jerryfleming2006@gmail.com
X-Gentoo-Bug: 259183
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=259183
2013-02-11 09:08:34 -06:00
William Hubbs
bbc6b96a40 oldnet: accomodate rkhunter false positive
rkhunter thinks OpenRC is a rootkit because of the hidefirstrout
variable. This has been renamed to hideFirstroute in order to get past
rkhunter.

I realize this is not an openrc bug. In this case though I do not have a
problem renaming the variable.

Reported-by: ago@gentoo.org
X-Gentoo-Bug: 339714
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=339714
2013-02-09 17:39:32 -06:00
William Hubbs
8a6c3391bd sysfs: mount the fusectl file system
Reported-by: vapier@gentoo.org
X-Gentoo-Bug: 453740
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=453740
2013-02-01 13:49:02 -06:00
William Hubbs
8be072628c remove cruft from /run directory
The /run directory is a mount point for a tmpfs and should not contain
any files or directories.  This cleans out the /run/openrc
symlink and any other files which were incorrectly placed in /run.
Thanks to Ian Stakenvicius for pointing out this solution.
2013-01-31 12:11:53 -06:00
Alexander Tsoy
2b0ff6f669 net.lo: add ipv6 net and host patterns
X-Gentoo-Bug: 442594
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=442594
2012-12-21 14:24:27 -06:00
Mihai Moldovan
a61fdd019e net.lo: allow address families to be set on routes
X-Gentoo-Bug: 447310
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?d=447310
2012-12-20 16:02:11 -06:00
Mike Frysinger
7557d62870 net.lo: sleep *after* carrier check
For devices that are always connected (e.g. ethernet cards), the current
carrier always wastes time by sleeping for 1 second.  This is because the
code sleeps first, then checks for carrier.  Invert the order so that we
return quickly for devices already active.  For devices which are not yet
up, there shouldn't be any real difference.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-18 00:24:02 -05: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
Steve L
8d61d03e27 localmount: quoting fixes
X-Gentoo-Bug: 446556
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=446556
2012-12-16 20:00:01 -06:00
William Hubbs
c5e163cffc typo fixes 2012-11-30 12:05:26 -06:00
William Hubbs
5cce37837b localmount: only skip unmounting /usr if it was premounted
Add a test when localmount is started to determine if /usr is mounted
from inside an initramfs for Linux systems. If it is not, we can unmount it when
localmount stops.

On *bsd systems, we always unmount /usr if it is separate.

Reported-by: ryao@gentoo.org
2012-11-29 10:19:20 -06:00
Robin H. Johnson
4ec1edc1f8 Whitespace.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-07 00:32:09 +00:00
Robin H. Johnson
91e28ab775 init.d/hostname: Document checkbashism false positive.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:12:24 +00:00
Robin H. Johnson
87daa26ca7 init.d/mtab: Another instance of the same pattern matching case.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:02:56 +00:00
Robin H. Johnson
670589571e init.d/bootmisc: Another instance of the same pattern matching case.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:01:42 +00:00
Robin H. Johnson
f6c3896087 init.d/bootmisc: POSIX XSI shellism.
In a pathname expansion, specifically single-character match, the pure
POSIX specification uses '!' as the Negation character where a regular
expression would normally be '^'.

Regular expression: "a[^a]a"
Pathname expansion pattern: "a[!a]a"

Reference:
IEEE Std 1003.1, 2004 Edition
2. Shell Command Language
2.13 Pattern Matching Notation
2.13.1 Patterns Matching a Single Character

> The description of basic regular expression bracket expressions in the
> Base Definitions volume of IEEE Std 1003.1-2001, Section 9.3.5, RE
> Bracket Expression shall also apply to the pattern bracket expression,
> except that the exclamation mark character ( '!' ) shall replace the
> circumflex character ( '^' ) in its role in a "non-matching list" in
> the regular expression notation. A bracket expression starting with an
> unquoted circumflex character produces unspecified results.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 22:49:49 +00: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
William Hubbs
5148047f89 netmount: drop need net from dependencies
Reported-by: <mattsch@gmail.com>
X-Gentoo-Bug: 439658
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439658
2012-10-25 16:33:56 -05:00
William Hubbs
8d17c634db oldnet: make the default carrier timeout 0
Some types of interfaces do not have a carrier, so it doesn't make sense
to automatically wait for one.

Reported-by: <rose@rz.uni-potsdam.de>
X-Gentoo-Bug: 438970
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=438970
2012-10-22 09:23:04 -05:00
William Hubbs
e8acdc6f85 tmfiles: change need dev to use dev.
This is being changed to use for the reason I stated in the previous
commit. There is no guarantee that someone is using a device manager.
2012-10-19 21:45:14 -05: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
William Hubbs
2ee3e9d952 Fix bashism in tmpfilesd scripts
Reported-by: <pesa@gentoo.org>
2012-10-19 13:02:30 -05:00
William Hubbs
6d84a4aed8 Oldnet: the loopback interface does not need sysfs 2012-10-16 20:56:34 -05:00
William Hubbs
76f76eb19a Migrate /var/run and /var/lock to symlinks
Now that we have full support for tmpfiles.d in OpenRC, we can migrate
/var/run and /var/lock to symbolic links to /run and /run/lock
respectively.
2012-10-16 14:33:27 -05:00
Christian Ruppert
8d9db8d02c Add Vim modeline 2012-10-16 21:00:45 +02:00