Fix gentoo bug #427996 correctly.
We should attempt to mount the file systems, but not try to start the
daemons. The previous fix removed mounting the file systems as well as
starting the daemons.
X-Gentoo-Bug: 508574
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=508574
Originally, we aborted all of the cgroup setup if /sys/fs/cgroup/openrc
was already mounted. This caused an issue in lxc containers, so we
should always allow the subsystems to be mounted.
X-Gentoo-Bug: 520606
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=520606
According to the sysctl man page, the --system option causes sysctl to
process all system configuration files, which include the following:
/run/sysctl.d/*.conf
/etc/sysctl.d/*.conf
/usr/local/lib/sysctl.d/*.conf
/usr/lib/sysctl.d/*.conf
/lib/sysctl.d/*.conf
/etc/sysctl.conf
X-Gentoo-Bug: 484796
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=484796
- Rename the static_dev switch in conf.d/devfs to skip_mount_dev since
this is a better description of what the switch does.
- Clarify the error messages in the devfs service script based on the
new name of the switch.
The hwclock service should set the time zone regardless of the setting
of the clock_hctosys variable. This needs to be done to prevent issues
when the system time is being synchronized using ntp.
X-Gentoo-Bug: 434410
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=434410
- 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.
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
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.
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>
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.
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
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
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
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>
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.
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
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.
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>
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
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>