rc.sysinit: remove warnings

These were useful in a transition period, but no need to keep them around.

If /usr is not mounted we probably won't even get this far. If devtmpfs is not supported
the previous mount of /dev would have given an errormessage.

This was prompted by a suggeston from Igor Podlesny to improve on the error handling, which
made me realise we could drop it.

Signed-off-by: Tom Gundersen <teg@jklm.no>
PKGBUILD: remove dep on grep

We no longer use grep.

Suggested-by: Igor Podlesny <for.poige+archlinux@gmail.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
rc.sysinit: look for correct root fsck marker

This has been broken since its was added back in 3dbbd1e2.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
locale: make sure LANG is always set as this is used in vconsole-setup to decide if we want utf8 mode

We no longer use LOCALE, so no need to set this.

Reported-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Tom Gundersen <teg@jklm.no>
rc.sysinit: change ordering a bit

Export LANG as early as possible. Then start the log. Then setup the console.

Signed-off-by: Tom Gundersen <teg@jklm.no>
PKGBUILD: remove duplicate makedepends line

This really does not matter very much, as this PKGBUILD file is for
convenience when building from git only. However, it just tripped
me up and caused me some needless head-scratching, so sort it out.

Signed-off-by: Tom Gundersen <teg@jklm.no>
rc.d: remove bad examples

rc.d must have explicit daemon name with command other than list

Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Remove ck_depends

ck_depends is no more used and should not be used anymore

Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
rc.conf.5: fix daemon prefixes list

Removing this line produce a bad formating in man page

Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Remove trailing colon from output

Signed-off-by: Allan McRae <allan@archlinux.org>
[tomegun: do the same for startup too]
Signed-off-by: Tom Gundersen <teg@jklm.no>
mounting: let systemd-remount-fs deal with overwriting mount options

Any api filesystem which appears in fstab is remounted with the correct mount options at the end of boot.

Also, move the binfmt mount to where it is needed.

Signed-off-by: Tom Gundersen <teg@jklm.no>
rc.sysinit: don't create /run/lock

This is done by tmpfiles, and we want to use the permissions in the config file, rather than
hardcoding them.

Signed-off-by: Tom Gundersen <teg@jklm.no>
tmpfiles: actually remove old files on boot

We were not deleting old files as we forgot to add the --clean flag

Signed-off-by: Tom Gundersen <teg@jklm.no>
cryptsetup: use systemd-cryptsetup rather than rolling our own

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>
vconsole: configure it only after udev has settled

If we configure the console too early, the settings will be lost when
the KMS driver is loaded.

This fixes FS#30482, which is a duplicate of FS#29781 (which was fixed
and then broken again by me).

Reported-by: Robert <rbrtdlz@googlemail.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
Revert "cryptsetup: use systemd-cryptsetup rather than rolling our own"

This reverts commit 6fe21269e5d54c52c168eac40225dca12a79c355.

git failure. this was not meant to be in master. nowhere near ready for
that :)
Remove sed from bootlog_stop()

bootlogd from our sysvinit package now removes all escape codes directly so
this (incomplete) sed call is no longer needed.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Tom Gundersen <teg@jklm.no>
hwclock: warn on discrepancy between /etc/adjtime and /etc/rc.conf about the timezone of the RTC

Also, move from /var/lib/hwclock/adjtime to /etc/adjtime. This must be fixed in util-linux too.

Signed-off-by: Tom Gundersen <teg@jklm.no>
remove /run/nologin before leaving rc.multi

systemd-186 writes this file when running systemd-tmpfiles, but
initscripts never removes it. This disallows all non-root logins.

Reported-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
cryptsetup: deprecate old syntax and default to the systemd one

We detect if the old syntax is used, and if so print a warning and use
the old parsing code. Otherwise, we pass everything on to
systemd-cryptsetup. Similarly to what was done with the network syntax,
we intend to keep the legacy stuff working for a long time.

See crypttab(5) for the new syntax[0].

The main reason for this change, is to be closer to what other distros
do. The systemd syntax is based on Debian's format, and is essentially
what is being used by at least Debian, Ubuntu, Fedora and Suse. Such
widespread use means that it will be better documented in
non-Arch-specific documentation, and is more likely to see integration
with third-party tools. It is also surely appreciated by admins who
use more than one distro, that they don't have to know more than one
config format for these sorts of basic things.

Furthermore, by actually sharing the code with systemd we get to rely on
their much more widespread testing and review compared to what we are able
to do ourselves. This is particularly important for the encryption code,
as it is the most obscure code in initscripts and any bugs in it would
have potentially very severe consequences.

Lastly, there are a few (albeit minor) issues I see with our current
format: /etc/crypttab is not a plaintext file, but needs to be parsed
through bash. The (deprecated) embedded passwords have been a source
of problems in the past. And, there is no level of abstraction between
the crypttab options and cryptsetup, we just pass them on blindly.

The new format and the old one cover roughly the same usecases. To the
best of my knowledge, the only use-case not (yet) supported by
systemd-cryptsetup, is mounting a removable device and reading
the key from a file on that device. For this, stick with the old syntax
(though be careful, it is inherently racy).

[0]: <http://0pointer.de/public/systemd-man/systemd.unit.html> (note
     that keyfile-offset support is coming in the next systemd version).