Age | Commit message (Collapse) | Author |
|
This reverts commit 6fe21269e5d54c52c168eac40225dca12a79c355.
git failure. this was not meant to be in master. nowhere near ready for
that :)
|
|
WORK IN PROGRESS; COMPLETELY UNTESTED!
In addition to supporting whatever systemd supports, we also support
all our own ways of specifying passphrases.
We have to look into how our "options" support differs from systemd's
and what we want to do about that.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
We were not deleting old files as we forgot to add the --clean flag
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
ck_depends is no more used and should not be used anymore
Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
|
|
These are shipped as symlinks by filesystem 2012.06, so these checks are
no longer needed.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
We don't need to see all modules inserted on every boot.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
No point in reinventing the wheel.
These and other tools are shipped in the systemd-tools
package. Functionality should be unchanged, but we no
longer have to maintain the code.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Currently, using "shutdown -F -r now" with fsck initcpio hook doesn't make a
full fsck on reboot.
Initscripts hook check if /run/initramfs/root-fsck is present to add -M option
to fsck which disable check of mounted filesystem. Initcpio doesn't check
/forcefsck file and create root-fsck file with a simple fsck check.
Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
|
|
We don't care about the side effects of the subshell created by the
pipe since everything is localized within this function. Use the more
"canonical" syntax. This should stop the recurring bug reports that we
seem to get from people who think they understand Bash syntax, e.g.
FS#27203
FS#28331
FS#29145
FS#28582
FS#27098
FS#29496
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Both the old and the new location works at the moment, but we want to remove the
symlink, so change to the new location.
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
Reported-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
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>
|