New package: mkinitcpio-18

This commit is contained in:
Andrea Brancaleoni 2015-06-24 23:54:11 +02:00
parent e3a785cdfe
commit 4343bc8d27
21 changed files with 2242 additions and 0 deletions

1
srcpkgs/mkinitcpio-encrypt Symbolic link
View File

@ -0,0 +1 @@
mkinitcpio

1
srcpkgs/mkinitcpio-lvm2 Symbolic link
View File

@ -0,0 +1 @@
mkinitcpio

1
srcpkgs/mkinitcpio-mdadm Symbolic link
View File

@ -0,0 +1 @@
mkinitcpio

1
srcpkgs/mkinitcpio-udev Symbolic link
View File

@ -0,0 +1 @@
mkinitcpio

View File

@ -0,0 +1,3 @@
# needed with new udev/mkinitcpio and as implemented in dracut:
# <http://git.kernel.org/?p=boot/dracut/dracut.git;a=commitdiff;h=12b9736228f2b34c15a9cb63be79cf7b6e865b54>
SUBSYSTEM=="block", KERNEL=="dm-[0-9]*", ACTION=="add|change", OPTIONS="db_persist"

View File

@ -0,0 +1,93 @@
# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
#
# This file is part of LVM2.
# Udev rules for LVM.
#
# Scan all block devices having a PV label for LVM metadata.
# Store this information in LVMetaD (the LVM metadata daemon) and maintain LVM
# metadata state for improved performance by avoiding further scans while
# running subsequent LVM commands or while using lvm2app library.
# Also, notify LVMetaD about any relevant block device removal.
#
# This rule is essential for having the information in LVMetaD up-to-date.
# It also requires blkid to be called on block devices before so only devices
# used as LVM PVs are processed (ID_FS_TYPE="LVM2_member" or "LVM1_member").
SUBSYSTEM!="block", GOTO="lvm_end"
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="lvm_end"
# If the PV label got lost, inform lvmetad immediately.
# Detect the lost PV label by comparing previous ID_FS_TYPE value with current one.
ENV{.ID_FS_TYPE_NEW}="$env{ID_FS_TYPE}"
IMPORT{db}="ID_FS_TYPE"
ENV{ID_FS_TYPE}=="LVM2_member|LVM1_member", ENV{.ID_FS_TYPE_NEW}!="LVM2_member|LVM1_member", ENV{LVM_PV_GONE}="1"
ENV{ID_FS_TYPE}="$env{.ID_FS_TYPE_NEW}"
ENV{LVM_PV_GONE}=="1", GOTO="lvm_scan"
# Only process devices already marked as a PV - this requires blkid to be called before.
ENV{ID_FS_TYPE}!="LVM2_member|LVM1_member", GOTO="lvm_end"
ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end"
# Inform lvmetad about any PV that is gone.
ACTION=="remove", GOTO="lvm_scan"
# Create /dev/disk/by-id/lvm-pv-uuid-<PV_UUID> symlink for each PV
ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-id/lvm-pv-uuid-$env{ID_FS_UUID_ENC}"
# If the PV is a special device listed below, scan only if the device is
# properly activated. These devices are not usable after an ADD event,
# but they require an extra setup and they are ready after a CHANGE event.
# Also support coldplugging with ADD event but only if the device is already
# properly activated.
# This logic should be eventually moved to rules where those particular
# devices are processed primarily (MD and loop).
# DM device:
KERNEL!="dm-[0-9]*", GOTO="next"
ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", ENV{DM_ACTIVATION}=="1", GOTO="lvm_scan"
GOTO="lvm_end"
# MD device:
LABEL="next"
KERNEL!="md[0-9]*", GOTO="next"
IMPORT{db}="LVM_MD_PV_ACTIVATED"
ACTION=="add", ENV{LVM_MD_PV_ACTIVATED}=="1", GOTO="lvm_scan"
ACTION=="change", ENV{LVM_MD_PV_ACTIVATED}!="1", TEST=="md/array_state", ENV{LVM_MD_PV_ACTIVATED}="1", GOTO="lvm_scan"
ACTION=="add", KERNEL=="md[0-9]*p[0-9]*", GOTO="lvm_scan"
ENV{LVM_MD_PV_ACTIVATED}!="1", ENV{SYSTEMD_READY}="0"
GOTO="lvm_end"
# Loop device:
LABEL="next"
KERNEL!="loop[0-9]*", GOTO="next"
ACTION=="add", ENV{LVM_LOOP_PV_ACTIVATED}=="1", GOTO="lvm_scan"
ACTION=="change", ENV{LVM_LOOP_PV_ACTIVATED}!="1", TEST=="loop/backing_file", ENV{LVM_LOOP_PV_ACTIVATED}="1", GOTO="lvm_scan"
ENV{LVM_LOOP_PV_ACTIVATED}!="1", ENV{SYSTEMD_READY}="0"
GOTO="lvm_end"
# If the PV is not a special device listed above, scan only after device addition (ADD event)
LABEL="next"
ACTION!="add", GOTO="lvm_end"
LABEL="lvm_scan"
# The table below summarises the situations in which we reach the LABEL="lvm_scan".
# Marked by X, X* means only if the special dev is properly set up.
# The artificial ADD is supported for coldplugging. We avoid running the pvscan
# on artificial CHANGE so there's no unexpected autoactivation when WATCH rule fires.
# N.B. MD and loop never actually reaches lvm_scan on REMOVE as the PV label is gone
# within a CHANGE event (these are caught by the "LVM_PV_GONE" rule at the beginning).
#
# | real ADD | real CHANGE | artificial ADD | artificial CHANGE | REMOVE
# =============================================================================
# DM | | X | X* | | X
# MD | | X | X* | |
# loop | | X | X* | |
# other | X | | X | | X
ENV{SYSTEMD_READY}="1"
RUN+="/usr/bin/lvm pvscan --background --cache --activate ay --major $major --minor $minor", ENV{LVM_SCANNED}="1"
LABEL="lvm_end"

View File

@ -0,0 +1,139 @@
#!/usr/bin/ash
run_hook() {
modprobe -a -q dm-crypt >/dev/null 2>&1
[ "${quiet}" = "y" ] && CSQUIET=">/dev/null"
# Get keyfile if specified
ckeyfile="/crypto_keyfile.bin"
if [ -n "$cryptkey" ]; then
IFS=: read ckdev ckarg1 ckarg2 <<EOF
$cryptkey
EOF
if [ "$ckdev" = "rootfs" ]; then
ckeyfile=$ckarg1
elif resolved=$(resolve_device "${ckdev}" ${rootdelay}); then
case ${ckarg1} in
*[!0-9]*)
# Use a file on the device
# ckarg1 is not numeric: ckarg1=filesystem, ckarg2=path
mkdir /ckey
mount -r -t "$ckarg1" "$resolved" /ckey
dd if="/ckey/$ckarg2" of="$ckeyfile" >/dev/null 2>&1
umount /ckey
;;
*)
# Read raw data from the block device
# ckarg1 is numeric: ckarg1=offset, ckarg2=length
dd if="$resolved" of="$ckeyfile" bs=1 skip="$ckarg1" count="$ckarg2" >/dev/null 2>&1
;;
esac
fi
[ ! -f ${ckeyfile} ] && echo "Keyfile could not be opened. Reverting to passphrase."
fi
if [ -n "${cryptdevice}" ]; then
DEPRECATED_CRYPT=0
IFS=: read cryptdev cryptname cryptoptions <<EOF
$cryptdevice
EOF
else
DEPRECATED_CRYPT=1
cryptdev="${root}"
cryptname="root"
fi
warn_deprecated() {
echo "The syntax 'root=${root}' where '${root}' is an encrypted volume is deprecated"
echo "Use 'cryptdevice=${root}:root root=/dev/mapper/root' instead."
}
for cryptopt in ${cryptoptions//,/ }; do
case ${cryptopt} in
allow-discards)
cryptargs="${cryptargs} --allow-discards"
;;
*)
echo "Encryption option '${cryptopt}' not known, ignoring." >&2
;;
esac
done
if resolved=$(resolve_device "${cryptdev}" ${rootdelay}); then
if cryptsetup isLuks ${resolved} >/dev/null 2>&1; then
[ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
dopassphrase=1
# If keyfile exists, try to use that
if [ -f ${ckeyfile} ]; then
if eval cryptsetup --key-file ${ckeyfile} open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; then
dopassphrase=0
else
echo "Invalid keyfile. Reverting to passphrase."
fi
fi
# Ask for a passphrase
if [ ${dopassphrase} -gt 0 ]; then
echo ""
echo "A password is required to access the ${cryptname} volume:"
#loop until we get a real password
while ! eval cryptsetup open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do
sleep 2;
done
fi
if [ -e "/dev/mapper/${cryptname}" ]; then
if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
export root="/dev/mapper/root"
fi
else
err "Password succeeded, but ${cryptname} creation failed, aborting..."
exit 1
fi
elif [ -n "${crypto}" ]; then
[ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
msg "Non-LUKS encrypted device found..."
if echo "$crypto" | awk -F: '{ exit(NF == 5) }'; then
err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip"
err "Non-LUKS decryption not attempted..."
return 1
fi
exe="cryptsetup open --type plain $resolved $cryptname $cryptargs"
IFS=: read c_hash c_cipher c_keysize c_offset c_skip <<EOF
$crypto
EOF
[ -n "$c_hash" ] && exe="$exe --hash '$c_hash'"
[ -n "$c_cipher" ] && exe="$exe --cipher '$c_cipher'"
[ -n "$c_keysize" ] && exe="$exe --key-size '$c_keysize'"
[ -n "$c_offset" ] && exe="$exe --offset '$c_offset'"
[ -n "$c_skip" ] && exe="$exe --skip '$c_skip'"
if [ -f "$ckeyfile" ]; then
exe="$exe --key-file $ckeyfile"
else
exe="$exe --verify-passphrase"
echo ""
echo "A password is required to access the ${cryptname} volume:"
fi
eval "$exe $CSQUIET"
if [ $? -ne 0 ]; then
err "Non-LUKS device decryption failed. verify format: "
err " crypto=hash:cipher:keysize:offset:skip"
exit 1
fi
if [ -e "/dev/mapper/${cryptname}" ]; then
if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
export root="/dev/mapper/root"
fi
else
err "Password succeeded, but ${cryptname} creation failed, aborting..."
exit 1
fi
else
err "Failed to open encryption mapping: The device ${cryptdev} is not a LUKS volume and the crypto= paramater was not specified."
fi
fi
rm -f ${ckeyfile}
}
# vim: set ft=sh ts=4 sw=4 et:

View File

@ -0,0 +1,44 @@
#!/bin/bash
build() {
local mod
add_module dm-crypt
if [[ $CRYPTO_MODULES ]]; then
for mod in $CRYPTO_MODULES; do
add_module "$mod"
done
else
add_all_modules '/crypto/'
fi
add_binary "cryptsetup"
add_binary "dmsetup"
add_file "/usr/lib/udev/rules.d/10-dm.rules"
add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
add_runscript
}
help() {
cat <<HELPEOF
This hook allows for an encrypted root device. Users should specify the device
to be unlocked using 'cryptdevice=device:dmname' on the kernel command line,
where 'device' is the path to the raw device, and 'dmname' is the name given to
the device after unlocking, and will be available as /dev/mapper/dmname.
For unlocking via keyfile, 'cryptkey=device:fstype:path' should be specified on
the kernel cmdline, where 'device' represents the raw block device where the key
exists, 'fstype' is the filesystem type of 'device' (or auto), and 'path' is
the absolute path of the keyfile within the device.
Without specifying a keyfile, you will be prompted for the password at runtime.
This means you must have a keyboard available to input it, and you may need
the keymap hook as well to ensure that the keyboard is using the layout you
expect.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:

View File

@ -0,0 +1,15 @@
#!/bin/sh
#
# Kernel post-install hook for mkinitcpio.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
if [ ! -x bin/mkinitcpio ]; then
exit 0
fi
mkinitcpio -g boot/initramfs-${VERSION}.img -k ${VERSION}
exit $?

View File

@ -0,0 +1,13 @@
#!/bin/sh
#
# Kernel post-remove hook for mkinitcpio.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
if [ -f /boot/initramfs-${VERSION}.img ]; then
rm -f /boot/initramfs-${VERSION}.img
fi
exit $?

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
#!/usr/bin/ash
run_earlyhook() {
mkdir /run/lvm
lvmetad
}
run_cleanuphook() {
kill $(cat /run/lvmetad.pid)
}
# vim: set ft=sh ts=4 sw=4 et:

View File

@ -0,0 +1,34 @@
#!/usr/bin/bash
build() {
local mod
for mod in dm-mod dm-snapshot dm-mirror dm-cache dm-cache-mq; do
add_module "$mod"
done
add_binary "/usr/bin/lvm"
add_binary "/usr/bin/lvmetad"
add_binary "/usr/bin/dmsetup"
add_binary "/usr/bin/cache_check"
add_binary "/usr/bin/cache_dump"
add_binary "/usr/bin/cache_metadata_size"
add_binary "/usr/bin/cache_repair"
add_binary "/usr/bin/cache_restore"
add_file "/usr/lib/udev/rules.d/10-dm.rules"
add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
add_file "/usr/lib/initcpio/udev/69-dm-lvm-metad.rules" "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
add_file "/usr/lib/initcpio/conf/lvm.conf" "/etc/lvm/lvm.conf"
add_runscript
}
help() {
cat <<HELPEOF
This hook enables LVM2 volumes in initramfs.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:

View File

@ -0,0 +1,49 @@
#!/usr/bin/ash
run_hook() {
local i= mdconfig=/etc/mdadm.conf
# for partitionable raid, we need to load md_mod first!
modprobe md_mod 2>/dev/null
if [ -n "$md" ]; then
echo 'DEVICE partitions' >"$mdconfig"
for i in $(cat /proc/cmdline); do
case $i in
# raid
md=[0-9]*,/*)
device=${i%%,*}
device=${device/=/}
array=${i#*,}
echo "ARRAY /dev/$device devices=$array"
;;
# partitionable raid
md=d[0-9]*,/*)
device=${i%%,*}
device=${device/=/_}
array=${i#*,}
echo "ARRAY /dev/$device devices=$array"
;;
# raid UUID
md=[0-9]*,[0-9,a-fA-F]*)
device=${i%%,*}
device=${device/=/}
array=${i#*,}
echo "ARRAY /dev/$device UUID=$array"
;;
# partitionable raid UUID
md=d[0-9]*,[0-9,a-fA-F]*)
device=${i%%,*}
device=${device/=/_}
array=${i#*,}
echo "ARRAY /dev/$device UUID=$array"
;;
esac
done >>"$mdconfig"
fi
# assemble everything
[ -s "$mdconfig" ] && /usr/bin/mdassemble
}
# vim: set ft=sh ts=4 sw=4 et:

View File

@ -0,0 +1,46 @@
#!/bin/bash
build() {
add_checked_modules -f 'dm-' 'drivers/md/*'
# check if a custom mdadm.conf exists
if grep -q ^ARRAY /etc/mdadm.conf; then
echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
add_file "/etc/mdadm.conf"
fi
add_binary "/usr/bin/mdassemble"
add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
add_runscript
}
help() {
cat <<HELPEOF
This hook loads the necessary modules for any raid root device,
and assembles the raid device when run.
If arrays are defined in /etc/mdadm.conf, the file will be used instead
of command line assembling.
Command Line Setup:
- for raid arrays with persistent superblocks:
md=<md device no.>,dev0,dev1,...,devn
md=<md device no.>,uuid
- for partitionable raid arrays with persistent superblocks:
md=d<md device no.>,dev0,dev1,...,devn
md=d<md device no.>,uuid
Parameters:
- <md device no.> = the number of the md device:
0 means md0, 1 means md1, ...
- <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1
or 0900878d:f95f6057:c39a36e9:55efa60a
Examples:
- md=d0,/dev/sda3,/dev/sda4 md=d1,/dev/hda1,/dev/hdb1
This will setup 2 md partitionable arrays.
- md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1
This will setup 2 md arrays with persistent superblocks.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:

View File

@ -0,0 +1,25 @@
#!/bin/bash
build() {
add_checked_modules -f 'dm-' 'drivers/md/*'
# check if a custom mdadm.conf exists
if grep -qw ^ARRAY "$BASEDIR/etc/mdadm.conf"; then
echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
add_file "/etc/mdadm.conf"
fi
add_binary "/usr/bin/mdadm"
add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
add_file "/usr/lib/udev/rules.d/64-md-raid-assembly.rules"
}
help() {
cat <<HELPEOF
This hook loads the necessary modules for a RAID array and uses incremental
assembly via udev at runtime to create the devices. This hook will NOT work
without the udev hook included on the image.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:

View File

@ -0,0 +1,20 @@
#!/usr/bin/ash
run_earlyhook() {
udevd --daemon --resolve-names=never
udevd_running=1
}
run_hook() {
msg ":: Triggering uevents..."
udevadm trigger --action=add --type=subsystems
udevadm trigger --action=add --type=devices
udevadm settle
}
run_cleanuphook() {
udevadm control --exit
udevadm info --cleanup-db
}
# vim: set ft=sh ts=4 sw=4 et:

View File

@ -0,0 +1,27 @@
#!/bin/bash
build() {
add_file "/etc/udev/udev.conf"
add_binary /usr/bin/udevd
add_binary /usr/bin/udevadm
for rule in 50-udev-default.rules 60-persistent-storage.rules 64-btrfs.rules 80-drivers.rules; do
add_file "/usr/lib/udev/rules.d/$rule"
done
for tool in ata_id scsi_id; do
add_file "/usr/lib/udev/$tool"
done
add_runscript
}
help() {
cat <<HELPEOF
This hook will use udev to create your root device node and detect the needed
modules for your root device. It is also required for firmware loading in
initramfs. It is recommended to use this hook.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:

View File

@ -0,0 +1,39 @@
From ea4c4154205372154457c794513ae46b61ea4e4c Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Mon, 4 Aug 2014 08:31:37 -0400
Subject: [mkinitcpio] [PATCH] avoid compound conditional leading to spurious
"errors"
As seen:
https://bbs.archlinux.org/viewtopic.php?id=185204
https://bbs.archlinux.org/viewtopic.php?id=185265
---
functions | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/functions b/functions
index 20bbffe..362d07b 100644
--- a/functions
+++ b/functions
@@ -423,11 +423,15 @@ add_full_dir() {
for f in "$1"/*; do
if [[ -L $f ]]; then
- [[ $f = $filter ]] && add_symlink "$f" "$(readlink "$f")"
+ if [[ $f = $filter ]]; then
+ add_symlink "$f" "$(readlink "$f")"
+ fi
elif [[ -d $f ]]; then
add_full_dir "$f"
elif [[ -f $f ]]; then
- [[ $f = $filter ]] && add_file "$f"
+ if [[ $f = $filter ]]; then
+ add_file "$f"
+ fi
fi
done
fi
--
2.1.0

View File

@ -0,0 +1,25 @@
From 6a100b4a4a709f177f383988079a2a3c3ada08b8 Mon Sep 17 00:00:00 2001
From: Andrea Brancaleoni <miwaxe@gmail.com>
Date: Thu, 25 Jun 2015 01:59:58 +0200
Subject: [PATCH] default to runit-init
---
init | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init b/init
index 4891ed8..7534d23 100644
--- a/init
+++ b/init
@@ -2,7 +2,7 @@
udevd_running=0
mount_handler=default_mount_handler
-init=/sbin/init
+init=/usr/bin/runit-init
rd_logmask=0
. /init_functions
--
2.4.4

View File

@ -0,0 +1,67 @@
# Template file for 'mkinitcpio'
pkgname=mkinitcpio
version=18
revision=1
noarch=yes
build_style=gnu-makefile
depends="busybox-static bsdcpio"
short_desc="Next generation of initramfs creation"
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
license="GPL-2"
homepage="https://wiki.archlinux.org/index.php/Mkinitcpio"
distfiles="https://sources.archlinux.org/other/$pkgname/$pkgname-$version.tar.gz"
checksum=187bdeeade08996010fbff480ccc91e47722d275c22fd6feb4a4b63061e9fc22
conf_files="/etc/mkinitcpio.conf"
patch_args="-Np1"
post_install() {
ln -s /usr/bin/busybox.static $DESTDIR/usr/lib/initcpio/busybox
vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-mkinitcpio
vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-mkinitcpio
}
mkinitcpio-udev_package() {
depends="${sourcepkg}>=${version}_${revision} eudev"
short_desc+=" - udev support"
pkg_install() {
vinstall ${FILESDIR}/udev_hook 644 usr/lib/initcpio/hooks udev
vinstall ${FILESDIR}/udev_install 644 usr/lib/initcpio/install udev
}
}
mkinitcpio-lvm2_package() {
depends="${sourcepkg}>=${version}_${revision} lvm2 thin-provisioning-tools"
short_desc+=" - lvm2 support"
conf_files="/usr/lib/initcpio/conf/lvm.conf"
pkg_install() {
vinstall ${FILESDIR}/lvm2_hook 644 usr/lib/initcpio/hooks lvm2
vinstall ${FILESDIR}/lvm2_install 644 usr/lib/initcpio/install lvm2
for RULES in ${FILESDIR}/*.rules; do
vinstall $RULES 644 usr/lib/initcpio/udev $(basename $RULES)
done
vinstall ${FILESDIR}/lvm.conf 644 usr/lib/initcpio/conf
}
}
mkinitcpio-encrypt_package() {
depends="${sourcepkg}>=${version}_${revision}
${sourcepkg}-lvm2>=${version}_${revision} cryptsetup"
short_desc+=" - encrypt support"
pkg_install() {
vinstall ${FILESDIR}/encrypt_hook 644 usr/lib/initcpio/hooks encrypt
vinstall ${FILESDIR}/encrypt_install 644 usr/lib/initcpio/install encrypt
}
}
mkinitcpio-mdadm_package() {
depends="${sourcepkg}>=${version}_${revision} mdadm"
short_desc+=" - mdadm support"
pkg_install() {
vinstall ${FILESDIR}/mdadm_hook 644 usr/lib/initcpio/hooks mdadm
vinstall ${FILESDIR}/mdadm_install 644 usr/lib/initcpio/install mdadm
vinstall ${FILESDIR}/mdadm_udev_install 644 usr/lib/initcpio/install mdadm_udev
}
}