diff options
author | Harald Hoyer <harald@redhat.com> | 2009-11-27 14:29:32 +0100 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2009-11-27 14:29:32 +0100 |
commit | ba67b9239bd72f9311d695dd694aab944b0976d3 (patch) | |
tree | 57a46956736e92a9d2a8b60c38f247f6a608d8a8 | |
parent | f4f45af792d9009f04cc51874997264853edca07 (diff) |
changed hostonly documentation and handling
-rwxr-xr-x | dracut | 1 | ||||
-rwxr-xr-x | dracut-functions | 2 | ||||
-rw-r--r-- | dracut.conf | 2 | ||||
-rw-r--r-- | dracut.conf.5 | 2 | ||||
-rwxr-xr-x | modules.d/90kernel-modules/installkernel | 2 |
5 files changed, 5 insertions, 4 deletions
@@ -145,6 +145,7 @@ fi fw_dir=${fw_dir//:/ } [[ $hostonly = yes ]] && hostonly="-h" +[[ $hostonly != "-h" ]] && unset hostonly if [[ -f $dracutbasedir/dracut-functions ]]; then . $dracutbasedir/dracut-functions diff --git a/dracut-functions b/dracut-functions index 134ad3c..ca35eaf 100755 --- a/dracut-functions +++ b/dracut-functions @@ -449,7 +449,7 @@ for_each_kmod_dep() { # If it is not, we will look at all kernel modules # This function returns the full filenames of modules that match $1 filter_kernel_modules () ( - if [[ $hostonly = '' ]]; then + if ! [[ $hostonly ]]; then filtercmd='find "$srcmods/kernel/drivers" -name "*.ko"' else filtercmd='cut -d " " -f 1 </proc/modules|xargs modinfo -F filename -k $kernel' diff --git a/dracut.conf b/dracut.conf index 8c8db21..24dbbef 100644 --- a/dracut.conf +++ b/dracut.conf @@ -13,7 +13,7 @@ #filesystems="" # build initrd only to boot current hardware -#hostonly="-h" +#hostonly="yes" # # install local /etc/mdadm.conf diff --git a/dracut.conf.5 b/dracut.conf.5 index 0bd702b..1b7b33d 100644 --- a/dracut.conf.5 +++ b/dracut.conf.5 @@ -45,7 +45,7 @@ Specify additional directories, where to look for firmwares, separated by : .BR do_strip="yes|no" Strip binaries in the initramfs (default=yes) .TP -.BR hostonly="-h|" +.BR hostonly="yes|no" Host-Only mode: Install only what is needed for booting the local host instead of a generic host. .TP diff --git a/modules.d/90kernel-modules/installkernel b/modules.d/90kernel-modules/installkernel index 95036fe..b966370 100755 --- a/modules.d/90kernel-modules/installkernel +++ b/modules.d/90kernel-modules/installkernel @@ -10,7 +10,7 @@ if [[ -z $drivers ]]; then instmods "=drivers/pcmcia" =ide "=drivers/usb/storage" instmods $(filter_kernel_modules block_module_test) # if not on hostonly mode, install all known filesystems if the required list is not set via the filesystems variable - if [[ $hostonly = '' ]]; then + if ! [[ $hostonly ]]; then if [[ -z $filesystems ]]; then instmods '=fs' else |