Age | Commit message (Collapse) | Author |
|
There is no reason not to use a keyfile, and allowing literal passphrases
in crypttab has caused issues with the parsing in the past. Furthermore,
it is not supported by any other crypttab implementation (to the best of my
knowledge). The use of keyfiles have been the recomendation in /etc/crypttab
for as long as I can remember.
We are looking at refactoring the encryption support, and I think it makes
sense to drop support for this when we move to the new implementation.
Cc: Thomas Bächler <thomas@archlinux.org>
Cc: Matthew Monaco <matt@0x01b.net>
Cc: Dave Reisner <d@falconindy.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
No functional change, just improve readability.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
dm-mod and dm-crypt will be autoloaded when needed (at least on kernels
newer than 2.6.36).
The rtc modules should be compiled in, as they have been in the official
kernels for some time.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
We haven't had the static binary in nearly 2 years, so simply call this
without a PATH lookup.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Avoid global variables, and make things clearer.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Fixes FS#28947.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Conflicts:
Makefile
|
|
This patch revert patch 042d197b4d989ec64.
NEED_ROOT was introduced to fix bug FS#24095. But in fact it doesn't solve it
because nobody use it. The idea was to allow initscripts developper to have
a check runned by every scripts which tell if scripts need to be run as root
(most of them) or not (and the script check itself which part of him have to be
run as root). All this to display a cute error message.
I think this complexity is superfluous and let part of initscript will fail if
rights are not enough.
I must confess that we should have marked this bug as wontfix rather than do that.
Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
|
|
Behave as described in the manpage.
This makes sure that we don't need to write to /etc unnecessarily
in case of updates to zoneinfo.
The reason for keeping a copy in /etc was if /usr was on a separate
unmounted partition, but this is no longer supported.
Reported-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
This avoids passing an empty array to umount
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This reverts commit fd54cc63cd6853b839d8a0d15ff7c8506743ac5a.
The correct return codes of "mount -a" are:
0 all mounts succeeded
64 some mounts succeeded and some failed
32 all mounts failed
We want to show "FAILED" on all return codes except for 0.
There is a bug in the new mount where "ignored" is taken to be
"failed", which gives some false negative. This will be fixed in
util-linux.
|
|
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
* Add whitespace to arithmetic expressions.
* Use boolean logic for semantically boolean variables.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
|
|
kmod doesn't read from /proc/modules to get attributes like module init
state, and won't act up when /proc isn't mounted or if /proc/modules
doesn't exist.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Detect -v as a parameter to status and avoid dumping everything to
/dev/null. Use this to restore error output to modprobe on loading
user-specified modules.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
The Arch default was 30 but upstream default was 120. This caused problems when
udev-177-3 introduced a 30 second timeout for broken kernel drivers.
We don't want to do this kind of fiddling in initscripts, if there is a need for
overriding the timeout this should be added upstream to udev.conf. My feeling is
that this is a bad idea, as there are now at least three different kinds of timeouts
at play in udev, and if they are set to something incompatible it will cause unneccesary
problems.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
This was needed when /etc/mtab was a regular file in order to avoid writing to it
when /etc/ was mounted ro. However, now it is not needed.
Passing -n should have been a noop, except for the NILFS mount helper. It will only
start the daemon if the -n flag is not passed.
This fixes FS#22523.
Tested-by: Alexander Lam <lambchop468@gmail.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
tac stupidly writes to a tempfile when the input isn't seekable, which
is true in our case as it's reading from a pipe. Since the whole goal
here is to avoid using disk, build an array in reverse. For whatever
reason, Bash truly sucks at doing this from a execution time standpoint,
but that isn't really a concern here.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
We were unconditionally copying the zoneinfo file when we should
be doing nothing.
Reported-by: Leonid Isaev <lisaev@umail.iu.edu>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
This looked ok on screen due to line-wrap, but the logs were a mess.
Should also avoid some lines being cut due to exceeding 256 chars.
Reported-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
This was not done in case $DAEMON_LOCALE was set and locale.conf
did not exist.
Fixes FS#27498.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
All packages in core/extra now supports this, and keeping them separated
might soon cause problems (in particular, I submitted a patch to rpcbind
that would cause problems if the symlinks are not in place).
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
The kernel won't store options it doesn't understand, so looking for
_netdev in /proc/self/mountinfo is worthless. Note that when /etc/mtab
is a symlink to /proc/self/mounts, libmount-powered mount will read from
/run/mount/utab to find the _netdev option.
Reported at: https://bbs.archlinux.org/viewtopic.php?pid=1021427
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
This would be useful for filesystem monitoring software which needs to
capture all changes to the filesystem - including the final writes to
the random seed and wtmp.
[tomegun: this hook is now the same as the postkillall hook, but that might
change, so I agree with adding it for the sake of having sane semantics.]
Signed-off-by: Devin J. Pohly <djpohly+arch@gmail.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
In case the initramfs already fsck'ed and mounted the root fs ro, we don't remount ro and
fsck.
We still remount the rootfs rw unconditionally at the end. We should probably stop doing
this and require the user to specify rw/ro explicitly in fstab.
We assume that the initramfs will also fsck and mount /usr, so we do not fsck any
mounted fs (not restricted to the rootfs).
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
We were in certain situations still writing to locale.sh. While it would
not have caused any harm, it was unintended and now removed.
This change means that locale.sh will no longer load the consolemap. This
would only be useful if it had been reset accidentally, and logging in again
would then fix a broken console. The issue is described in FS#18759. It is
not clear to me if this is still an issue, or if it solved by our new
utf8/non-utf8 handling.
Either way, resetting the consolemap unconditionaly does not make much sense
in case the user has changed it on purpose.
It might make sense to factor out the vconsole initialization into a
"setup/repair my console" script, similar to systemd's
/lib/systemd/systemd-vconsole-setup, but that would have to wait for a
future release.
Reported-by: Dave Reisner <d@falconindy.com>
Cc: Роман Кирилич <roman.kyrylych@gmail.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
...where it belongs
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Embarassing. This function was just plain broken.
- read/trim the correct variables
- allow comments (only start of line, no midline)
- allow quoting via single or double quotes.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This adds a 'parse_envfile' function that reads files such as
/etc/locale.conf and /etc/vconsole.conf without sourcing them as bash
logic. Several benefits are realized from this:
- Impossible to execute arbitrary code
- Bad syntax won't prevent the entire file from being read
- Possible to limit what variables are allowed
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This also fixes a bug that unintentionally sets LOCALE instead of
just defaulting to a value when its empty.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
In particular "^[[119G".
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Factor out umounting. Explicitly skip umounting API directories, rather
than matching on fs type. This allows us to e.g. unmount all tmpfs but leaving
/run and /dev/shm alone.
v3: fixed some regressions in v2, made 'API filesystems' less general
v2: new umount_all implementation based on proposal by Dave and input from
Anthony. Also, ignore ramfs as it is not backed by swap.
Cc: Dave Reisner <d@falconindy.com>
Cc: C Anthony Risinger <anthony@xtfx.me>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
|
|
We don't have the problem with non-bash shells here, but better make the support uniform.
|
|
This is mainly to support non-bash shells that cannot source rc.conf.
The format of /etc/locale.conf is described here:
<http://0pointer.de/public/systemd-man/locale.conf.html>.
If LANG is not set in locale.conf, then we fall back to LOCALE
from rc.conf, as before.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
This can be a symlink or a regular file, and rc.sysinit will preserve it
as such.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
I was getting "^[71G", this fixed it.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
With the new logic we will only wait for the timeout in case of problems,
we therefore increase the timeout as this will make problems more obvious.
There has been reports of problems with processes not being terminated, but
hopefully this should help us reproduce them.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Abstract out timezone setting into its own function, passing
Country/Area as a parameter. Do some menial checking to make sure:
- the zonefile actually exists, erroring when it doesn't
- /etc/localtime is a symlink to the correct zoneinfo file, relinking
when it isn't.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This isn't _all_ your modules. Just the extras specified from rc.conf.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Daemon running in background should let error output to be printed.
Standart output is still hided to have a correct printing in default cases.
This will help to detect error in daemon runned in background.
This will also remove have_daemon call which is already called in start_daemon.
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
|
|
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Suggested-by: Karol B?a?ewicz <karol.blazewicz@gmail.com>
Suggested-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Fixes #25623.
Reported-by: Segej Puykin <arch@sergej.pp.ru>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
This keeps the functionality, but disables it by default.
Individual scripts/functions can turn it on if they want.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Categorize actions as 'create' or 'remove', for finer control.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This is the same concept as systemd's tmpfiles handling, slightly
simplified to avoid timed re-triggering of file cleaning. Most of our
current file cleaning that takes place in rc.single and rc.sysinit is
replaced by this, with the exception that we hold onto the /var/lock and
/var/run for finer control, since we still check for the possibility of
these directories being symlinks and adjust accordingly.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|