aboutsummaryrefslogtreecommitdiff
path: root/init.d
AgeCommit message (Collapse)Author
2014-07-09init.d/local: bring functioning more in line with how sysctl worksWilliam Hubbs
- remove the has_executables variable since it isn't used. - Convert the conditional calls to ewend/vewend to a single call to veend. - Always call eend after all scripts are executed passing the appropriate error code. Because of this change, you will see only an overall status when starting or stopping local unless you are using verbose mode.
2014-07-05Add support for verbose "local" service runscriptThomas D
With this patch, the "local" service runscript will be verbose like the "sysctl" service when 'rc_verbose="yes"' is set. Example output successful start: * Stopping local ... * Executing "/etc/local.d/00will-stop.stop" ... [ ok ] * Starting local ... * Executing "/etc/local.d/00will-start.start" ... [ ok ] * Executing "/etc/local.d/01 test.start" ... [ ok ] Example output with failing executables: * Stopping local ... * Executing "/etc/local.d/00will-stop.stop" ... [ ok ] * Executing "/etc/local.d/will-fail.stop" ... mount: can't find foo in /etc/fstab * Execution of "/etc/local.d/will-fail.stop" failed. [ !! ] * Starting local ... * Executing "/etc/local.d/00will-start.start" ... [ ok ] * Executing "/etc/local.d/01 test.start" ... [ ok ] * Executing "/etc/local.d/will-fail2.start" ... mount: can't find bar in /etc/fstab * Execution of "/etc/local.d/will-fail2.start" failed. [ !! ] * Executing "/etc/local.d/will-fail.start" ... mount: can't find foo in /etc/fstab * Execution of "/etc/local.d/will-fail.start" failed. [ !! ] X-Gentoo-Bug: 489274 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=489274
2014-07-04sysctl.Linux.in: remove -lxc from keywordsKaarle Ritvanen
certain tunables can be set independently for each container X-Gentoo-Bug: 516050 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516050
2014-06-30sysfs: Do not mount openrc cgroup if it is already mountedWilliam Hubbs
We were not checking to see if /sys/fs/cgroup/openrc was already mounted before we mounted it. This fixes that issue. Thanks to Robin Johnson <robbat2@gentoo.org> for pointing this out.
2014-06-20SELinux filesystem is at /sys/fs/selinuxSven Vermeulen
The SELinux filesystem has been moved to /sys/fs/selinux for quite some time. We kept supporting /selinux for backwards compatibility, but it's time to move forward on this. X-Gentoo-Bug: 511718 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=511718 Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2014-04-03tmpfiles.dev: remove --remove optionAndrew Gregory
For compatibility with systemd. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-03-27tmpfiles: add support for --boot optionAndrew Gregory
For compatibility with systemd-tmpfiles. Fixes #17 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-01-23devfs: explicitly mount /dev/shm with mode=1777Mike Frysinger
The current code relies on the tmpfs mount defaulting to 1777 permissions. If it doesn't, things break badly. This can come up when tmpfs is disabled in the kernel and ramfs is being used instead (the kernel will alias tmpfs to ramfs). The default permissions for ramfs is 0755.
2014-01-15bootmisc: Remove console directories only if $RC_LIBEXECDIR is writableWilliam Hubbs
X-Gentoo-Bug: 489368 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=489368
2014-01-05devfs: add code to mount /devWilliam Hubbs
All Linux systems need /dev to be set up,so add code to devfs to do this. The process devfs follows is below. 1. If static_dev is yes, nothing is done. 2. if /dev is an entry in fstab it is mounted or remounted based on that entry. 3. If /dev is not in fstab, it attempts to mount /dev as a devtmpfs or tmpfs depending on which is defined in the kernel; devtmpfs is preferred. 4. If neither devtmpfs nor tmpfs is defined, it assumes the user wants static /dev and prints a warning. X-Gentoo-Bug: 492694 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=492694
2013-12-29Rename runscript to openrc-runWilliam Hubbs
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-08bootmisc.in: fix boot orderPetre Rodan
Bootmisc was running before the root file system was remounted rw in some situations. This fixes that issue. X-Gentoo-Bug: 493442 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=493442
2013-12-06network.in: skip loopback deviceAndrew Gregory
The loopback interface is supposed to be handled by the loopback service, but sys_interfaces includes it. This causes network to try to start it and means that network provides net even if lo is the only interface configured. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2013-12-02remove type commandWilliam Hubbs
The posix equivalent of the type command is "command -v", so now we use that. Thanks to Jonathan Callen <jcallen@gentoo.org> for informing me wrt the fix.
2013-10-28bootmisc: do not run clean_run on VSERVER systemsWilliam Hubbs
X-Gentoo-Bug: 489370 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=489370
2013-10-28loopback: do not run in a prefix or vserverWilliam Hubbs
X-Gentoo-Bug: 489370 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=489370
2013-10-18remove redundant sync callsWilliam Hubbs
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-14Add uml keyword to fsck service.Alexander V Vershilov
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-08netmount: add -lxc keywordWilliam Hubbs
Netmount should not run on lxc, thanks to Mark van Dijk <funtoo@internecto.net>.
2013-10-04FL-786: localmount: support filesystem mounting on openvzDaniel Robbins
2013-09-01init.d: update ignore patternsWilliam Hubbs
Remove net.lo* from the ignore pattern since these scripts are no longer part of OpenRC and add loopback and tmpfiles.dev.
2013-08-13Remove gentoo's net.* scriptsWilliam Hubbs
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-06Fix Permission Denied on reading dmesg in an LXC containerFedja Beader
2013-07-31devfs: Add -lxc keywordAlexander V Vershilov
Devfs is not needed for LXC, as LXC mounts all required fs on it's own. Reported by specing.
2013-07-26swapfiles: do not try to unmount all tmpfs mountsWilliam Hubbs
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-25Introduce the tmpfiles.dev serviceWilliam Hubbs
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-06-24efivarfs: Support EFI variable access in 3.10 kernels.Robin H. Johnson
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-04-27fsck: fix typoEugeny Shkrigunov
X-Gentoo-Bug: 467158 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=467158
2013-04-08create loopback serviceWilliam Hubbs
The loopback service handles the basic settings for the loopback interface, regardless of the network manager you are using.
2013-03-22localmount: add "no" in front of network file system typesWilliam Hubbs
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-08oldnet: convert netmask to decimal numbers in _netmask2cidrYuta SATOH
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-06ipfw: change opts variable to extra_commandsWilliam Hubbs
Reported-by: 4glitch@gmail.com X-Gentoo-Bug: 459694 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=459694
2013-02-23Fix shebangs in services to point to the correct location of runscriptAndrew Gregory
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-16do not use SYSCONFDIR for binfmt.dAndrew Gregory
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-16consolefont: use setfont to save the current fontAndrew Gregory
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-16bootmisc: Skip cleaning /var/run or tmp directories if they are tmpfsWilliam Hubbs
Reported-by: walter@pratyeka.org X-Gentoo-Bug: 454338 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=454338
2013-02-15keymaps: fix the use of loadkeys in the euro fixWilliam Hubbs
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-14devfs: Mount the posix message queue file systemWilliam Hubbs
Reported-by: reuben.m@gmail.com X-Gentoo-Bug: 456998 X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=456998
2013-02-11Rename shutdown_network setting to keep_networkWilliam Hubbs
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-11oldnet: add support for shutdown_network from newnetWilliam Hubbs
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-09oldnet: accomodate rkhunter false positiveWilliam Hubbs
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-01sysfs: mount the fusectl file systemWilliam Hubbs
Reported-by: vapier@gentoo.org X-Gentoo-Bug: 453740 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=453740
2013-01-31remove cruft from /run directoryWilliam Hubbs
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.
2012-12-21net.lo: add ipv6 net and host patternsAlexander Tsoy
X-Gentoo-Bug: 442594 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=442594
2012-12-20net.lo: allow address families to be set on routesMihai Moldovan
X-Gentoo-Bug: 447310 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?d=447310
2012-12-18net.lo: sleep *after* carrier checkMike Frysinger
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-18fsck: simplify skiplist setupMike Frysinger
Use printf rather than a manual for loop. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-16localmount: quoting fixesSteve L
X-Gentoo-Bug: 446556 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=446556
2012-11-30typo fixesWilliam Hubbs
2012-11-29localmount: only skip unmounting /usr if it was premountedWilliam Hubbs
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