diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-05-10 19:04:32 +0200 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-05-10 19:04:32 +0200 |
commit | 11ad649e6e6f3a7999225ca6f2d54f661bde5d1a (patch) | |
tree | 804fb62dacb078fec55a8b2a1194d1a4ffae1797 /hooks | |
parent | 23546042e263afa8978f27910b931140d3f1ab07 (diff) | |
download | mkinitcpio-11ad649e6e6f3a7999225ca6f2d54f661bde5d1a.tar.gz mkinitcpio-11ad649e6e6f3a7999225ca6f2d54f661bde5d1a.tar.xz |
Added new parseblock handling (1.3)
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@95 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'hooks')
-rw-r--r-- | hooks/filesystems | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/hooks/filesystems b/hooks/filesystems index e6d980d..416ad9f 100644 --- a/hooks/filesystems +++ b/hooks/filesystems @@ -1,18 +1,6 @@ # vim: set ft=sh: run_hook () { - isnumeric () - { - i=0; - while [ $i -lt ${#1} ]; do - case ${1:$i:1} in - [0-9A-Fa-f]) i=$(($i+1)); continue;; - *) return 1;; - esac - done - return 0 - } - msg -n ":: Loading root filesystem module..." if [ "x${rootfstype}" != "x" ]; then FSTYPE="${rootfstype}" @@ -27,15 +15,13 @@ run_hook () export rootdelay=0 fi - dev_t=$( /bin/parseblock "${root}" ) - if isnumeric "${root}"; then - export root="/dev/root" - fi - if [ "x${dev_t}" != "x" ]; then - /bin/mknod "${root}" b ${dev_t} >/dev/null 2>&1 - else + eval $( /bin/parseblock "${root}") + if [ "${BLOCKNAME}" = "unknown" -o "x{BLOCKDEVICE}" = "x"]; then FSTYPE="unknown" echo "ERROR: Failed to parse block device '${root}'" + else + export root="${BLOCKNAME}" + /bin/mknod "${BLOCKNAME}" b ${BLOCKDEVICE} >/dev/null 2>&1 fi fi @@ -45,11 +31,11 @@ run_hook () FSTYPE="unknown" fi - if [ "${FSTYPE}" = "unknown" ]; then - echo "ERROR: root fs cannot be detected. Try using the rootfstype= kernel parameter." - fi fi msg " ${FSTYPE}" - kinit_params="${kinit_params} rootfstype=${FSTYPE}" - /bin/modprobe -q "${FSTYPE}" >/dev/null 2>&1 + if [ "${FSTYPE}" = "unknown" ]; then + echo "ERROR: root fs cannot be detected. Try using the rootfstype= kernel parameter." + else + /bin/modprobe -q "${FSTYPE}" >/dev/null 2>&1 + fi } |