summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-05-05 18:36:55 +0200
committerAaron Griffin <aaron@archlinux.org>2006-05-05 18:36:55 +0200
commitf486b7ed6f8e289c8d897fcaeac7a0f52c7493c0 (patch)
treeb2128c29643067a0edbc734a8565d58b5928dd43
parent2c6b8367f0f526c6a12b91b85f2f7f3ef35b5559 (diff)
downloadmkinitcpio-f486b7ed6f8e289c8d897fcaeac7a0f52c7493c0.tar.gz
mkinitcpio-f486b7ed6f8e289c8d897fcaeac7a0f52c7493c0.tar.xz
kinit param handling change to match kinit patch (cmdline.patch)
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@68 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r--hooks/encrypt13
-rw-r--r--hooks/filesystems1
-rw-r--r--init5
-rw-r--r--install/encrypt2
4 files changed, 6 insertions, 15 deletions
diff --git a/hooks/encrypt b/hooks/encrypt
index 9ae2d45..30dfc12 100644
--- a/hooks/encrypt
+++ b/hooks/encrypt
@@ -3,17 +3,6 @@
# encryption schemes
run_hook ()
{
- replace_root ()
- {
- newcmdline=""
- for cmd in $CMDLINE; do
- case "$cmd" in
- root=*) newcmdline="${newcmdline} root=${1}" ;;
- *) newcmdline="${newcmdline} ${cmd}" ;;
- esac
- done
- export CMDLINE="${newcmdline}"
- }
mkdevice () { /bin/mknod "/dev/mapper/control" c ${1} ${2}; }
/bin/modprobe -a -q dm-crypt >/dev/null 2>&1
@@ -33,7 +22,6 @@ run_hook ()
done
if [ -e "/dev/mapper/root" ]; then
export root="/dev/mapper/root"
- replace_root ${root}
else
err "Password succeeded, but root creation failed, aborting..."
exit 1
@@ -69,7 +57,6 @@ run_hook ()
else
if [ -e "/dev/mapper/root" ]; then
export root="/dev/mapper/root"
- replace_root ${root}
else
err "Password succeeded, but root creation failed, aborting..."
exit 1
diff --git a/hooks/filesystems b/hooks/filesystems
index 4fe655c..55d6725 100644
--- a/hooks/filesystems
+++ b/hooks/filesystems
@@ -22,5 +22,6 @@ run_hook ()
fi
fi
msg " ${FSTYPE}"
+ kinit_params="${kinit_params} rootfstype=${FSTYPE}"
/bin/modprobe -q "${FSTYPE}" >/dev/null 2>&1
}
diff --git a/init b/init
index f2d6361..fe42234 100644
--- a/init
+++ b/init
@@ -11,6 +11,9 @@ msg ":: Loading Initramfs"
read CMDLINE </proc/cmdline
export CMDLINE
+# Used so hooks can override params to kinit
+export kinit_params=""
+
for cmd in $CMDLINE; do
case "$cmd" in
[0123456Ss]) continue ;;
@@ -74,4 +77,4 @@ fi
# Optimize fs type loop for mounting rootfs
msg ":: Initramfs Completed - control passing to kinit"
-exec /bin/kinit rootfstype=${FSTYPE} $CMDLINE < /dev/console > /dev/console
+exec /bin/kinit "root=${root}" ${kinit_params} < /dev/console > /dev/console
diff --git a/install/encrypt b/install/encrypt
index d81966b..65007fc 100644
--- a/install/encrypt
+++ b/install/encrypt
@@ -2,7 +2,7 @@
install ()
{
- MODULES=" dm-crypt $(all_modules "/crypto/") "
+ MODULES=" dm-crypt $(all_modules "/crypto/" | grep -v "aes.ko" ) "
BINARIES=""
add_file "/sbin/cryptsetup.static" "/bin/cryptsetup"
FILES=""