diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-05-04 10:20:35 +0200 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-05-04 10:20:35 +0200 |
commit | cb07072558843db27776a4fa81012c7040d986db (patch) | |
tree | 7ed2b35df2e73b5c1911a49100e2d9e7acb29997 | |
parent | 9f72836f201e6ad8188ee94c99c3e9a03217c994 (diff) | |
download | mkinitcpio-cb07072558843db27776a4fa81012c7040d986db.tar.gz mkinitcpio-cb07072558843db27776a4fa81012c7040d986db.tar.xz |
Filesystem update - allow a pre-made device node (udev)
functions : Bugfix grep on checked_modules
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@58 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r-- | functions | 2 | ||||
-rw-r--r-- | hooks/filesystems | 9 |
2 files changed, 6 insertions, 5 deletions
@@ -23,7 +23,7 @@ checked_modules () { if [ -e "${MODULE_FILE}" ]; then for mod in $(all_modules ${@}); do - if grep "$(basename ${mod%%\.ko})" "${MODULE_FILE}" >/dev/null 2>&1; then + if grep "^$(basename ${mod%%\.ko})$" "${MODULE_FILE}" >/dev/null 2>&1; then echo ${mod} fi done diff --git a/hooks/filesystems b/hooks/filesystems index 0990b4c..4fe655c 100644 --- a/hooks/filesystems +++ b/hooks/filesystems @@ -5,18 +5,19 @@ run_hook () if [ "x${rootfstype}" != "x" ]; then FSTYPE="${rootfstype}" else - if [ "x${root}" != "x" ]; then + if [ ! -e "${root}" ]; then msg "Attempting to create root device '${root}'" dev_t=$( /bin/parseblock "${root}" ) if [ "x${dev_t}" != "x" ]; then /bin/mknod "${root}" b ${dev_t} >/dev/null 2>&1 - eval $( /bin/fstype < "${root}" ) else FSTYPE="unknown" echo "ERROR: Failed to parse block device '${root}'" fi - else - FSTYPE="unknown" + fi + eval $( /bin/fstype < "${root}" ) + + if [ "${FSTYPE}" = "unknown" ]; then echo "ERROR: root fs cannot be detected. Try using the rootfstype= kernel parameter." fi fi |