5 if [ "$1" == "-n" ]; then
9 echo $NONL "$@" > /dev
/stderr
13 if [ "$1" == "-n" ]; then
19 $cmd "usage: `basename $0` [--version] [--help] [-v] [-f] [--preload <module>]"
20 $cmd " [--image-version] [--with=<module>]"
21 $cmd " <initrd-image> <kernel-version>"
23 $cmd " (ex: `basename $0` /boot/initramfs-$(uname -r).img $(uname -r))"
25 if [ "$1" == "-n" ]; then
33 while [ $# -gt 0 ]; do
36 if [ "$1" != "${1##--with-usb=}" ]; then
37 usbmodule
=${1##--with-usb=}
39 usbmodule
="usb-storage"
41 basicmodules
="$basicmodules $usbmodule"
45 if [ "$1" != "${1##--with-avail=}" ]; then
46 modname
=${1##--with-avail=}
52 basicmodules
="$basicmodules $modname"
55 if [ "$1" != "${1##--with=}" ]; then
62 basicmodules
="$basicmodules $modname"
65 echo "mkinitrd: dracut compatibility wrapper"
69 dracut_args
="${dracut_args} -v"
72 dracut_args
="${dracut_args} -f"
75 if [ "$1" != "${1##--preload=}" ]; then
76 modname
=${1##--preload=}
81 basicmodules
="$basicmodules $modname"
87 if [ "$1" != "${1##--rootfs=}" ]; then
88 rootfs
="${1##--rootfs=}"
93 dracut_args
="${dracut_args} --filesystems $rootfs"
101 --omit-scsi-modules) ;;
102 --omit-ide-modules) ;;
103 --omit-raid-modules) ;;
104 --omit-lvm-modules) ;;
123 if [ -z "$target" ]; then
125 elif [ -z "$kernel" ]; then
136 if [ -z "$target" -o -z "$kernel" ]; then
140 if [ -n "$img_vers" ]; then
141 target
="$target-$kernel"
144 if [ -n "$basicmodules" ]; then
145 dracut
-H $dracut_args --add-drivers "$basicmodules" "$target" "$kernel"
147 dracut
-H $dracut_args "$target" "$kernel"
150 # vim:ts=8:sw=4:sts=4:et