init: fix location of udevd

We've gotta stop moving this around...

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
init_functions: fix missing * in fsck message

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
shutdown: improve handling of dm devices

- use the 'remove' action for cryptsetup rather than luksClose
- handle dm devices with dmsetup, not lvm
- disable dmraid devices by name, instead of all at once

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
add minor tweaks to make testing a bit easier

Since INSTDIR and HOOKDIR are understood as arrays now, declare them as
such with the local 'hooks' and 'install' first to override the local
FS. This makes the missing udev error go away and allows easier testing
of other out of tree hooks.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
mkinitcpio: hardcode a sane PATH

Avoid pulling insane apps from user added PATH elements.

FS#29162

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
autodetect: simplify mdadm autodetection

Everything we need to know about the devices is already in sysfs
attributes for the md devices. Read any found nodes for raid levels and
sort them into our whitelist. This removes the need for root in order to
"scan" arrays.

More code churn on top of d11ba00.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
shutdown: refine umount_all logic

remove the mountpoint filtering from the awk processing and drop the -l
flag from umount. Not clear why either of these were present -- they're
both wrong.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
shutdown: detach all loop devices before umounting

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
base: move usb modprobe rule to /usr/lib/modprobe.d

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
create /lib as a symlink to /usr/lib

This makes us a little more future proof as far as moving files around.
No need for 2 lib/ directories in early userspace anyways.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
fix pcmcia /usr move
hooks: remove pcmcia hook

This hook has been moved to the pcmciautils package.

Signed-off-by: Tom Gundersen <teg@jklm.no>
Acked-by: Dave Reisner <d@falconindy.com>
mdadm: fix raid[456] autodetection

20509ade neglected to filter the raid456 module when detecting raid[456]
arrays, which lead to non-bootable systems from the autodetect-enabled
image.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
hooks: use consistent shebang, modeline, function style

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
btrfs: delete hooks -- these belong to core/btrfs

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
mkinitcpio: refer to /usr/lib/modules uniformly

This should have been done as part of b65cf9cd9.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
mkinitcpio: refuse to run without hooks defined

This still doesn't solve all our problems, but it gets us closer.
There's no point in creating an image if HOOKS aren't present as this is
the bread and butter of any sane mkinitcpio recipe.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
bash-completion: align whitespace with rest of repo

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
gitignore: ignore the right manpage section

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
functions: add parseopts for longopt fun

Signed-off-by: Dave Reisner <dreisner@archlinux.org>