diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-04-26 00:51:44 +0200 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-04-26 00:51:44 +0200 |
commit | 0a28a95f49eaeb33487c21995c71b5ca74df131e (patch) | |
tree | b61e928dfed751ae443bafeea7c76adff73257e3 | |
parent | d323115c7b1a02244a52e298d83be8a390dbcc28 (diff) | |
download | mkinitcpio-0a28a95f49eaeb33487c21995c71b5ca74df131e.tar.gz mkinitcpio-0a28a95f49eaeb33487c21995c71b5ca74df131e.tar.xz |
Add: filesystem autodetection
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@19 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r-- | install/filesystems-auto | 17 | ||||
-rw-r--r-- | mkinitcpio | 12 | ||||
-rw-r--r-- | mkinitcpio.conf | 2 |
3 files changed, 24 insertions, 7 deletions
diff --git a/install/filesystems-auto b/install/filesystems-auto new file mode 100644 index 0000000..bf7976c --- /dev/null +++ b/install/filesystems-auto @@ -0,0 +1,17 @@ +# vim: set ft=sh: + +install () +{ + MODULES=" $(cat /proc/filesystems | grep -v nodev) " + BINARIES="" + FILES="" + SCRIPT="filesystems" +} + +help () +{ +cat<<HELPEOF + This hook is responsible for loading filesystems for the root device. + Detection will be done at runtime. +HELPEOF +} @@ -16,6 +16,7 @@ # Settings BASEDIR="" +FILELIST=".tmpfilelist" KERNELVERSION="$(uname -r)" FUNCTIONS="functions" #/lib/initramfs/functions CONFIG="mkinitcpio.conf" @@ -33,23 +34,23 @@ usage () echo "${APPNAME}: usage" echo " -c CONFIG Use CONFIG file. default: /etc/mkinitcpio.conf" echo " -k KERNELVERSION Use KERNELVERSION. default: $(uname -r)" - echo " -s Save filelist. default: no" + echo " -s NAME Save filelist. default: no" echo " -b BASEDIR Use BASEDIR. default: /" echo " -g IMAGE Generate a cpio image as IMAGE. default: no" - echo " -a Append to an existing filelist. default: no" + echo " -a NAME Append to an existing filelist. default: no" echo " -q Quiet output. Default: no" echo " -h This message." exit 1 } -while getopts 'c:k:sb:g:aqh' arg; do +while getopts 'c:k:s:b:g:a:qh' arg; do case "$arg" in c) CONFIG="$OPTARG" ;; k) KERNELVERSION="$OPTARG" ;; - s) SAVELIST="y" ;; + s) SAVELIST="y"; FILELIST="$OPTARG" ;; b) BASEDIR="$OPTARG" ;; g) GENIMG="$OPTARG" ;; - a) APPEND="y" ;; + a) APPEND="y" FILELIST="$OPTARG" ;; q) QUIET="y" ;; h|?) usage ;; *) echo "invalid argument '$arg'"; usage ;; @@ -63,7 +64,6 @@ if [ "${BASEDIR:${#BASEDIR}}" == "/" ]; then fi MODULEDIR="${BASEDIR}/lib/modules/${KERNELVERSION}" -FILELIST=${1:-"initcpio.filelist"} if [ "x${BASEDIR}" != "x" ]; then if [ "${BASEDIR:0:1}" != "/" ]; then diff --git a/mkinitcpio.conf b/mkinitcpio.conf index 392467d..07e738b 100644 --- a/mkinitcpio.conf +++ b/mkinitcpio.conf @@ -2,4 +2,4 @@ MODULES="8139too snd_intel8x0" BINARIES="grep" FILES="" -HOOKS="base ide filesystems" +HOOKS="base ide filesystems-auto" |