Browse Source

don't add volatile swap partitions to host_devs

master
Harald Hoyer 12 years ago
parent
commit
bcfbddefe1
  1. 1
      TODO
  2. 17
      dracut.sh

1
TODO

@ -22,6 +22,7 @@ INITRAMFS TODO


GENERATOR TODO GENERATOR TODO


- remove wait for swap devs, if no "resume=" is given on the kernel command line
- add presets (predefined set of modules) - add presets (predefined set of modules)
- add interpreter/plugin-scripts to be sourced at the beginning or end (can use dracut-functions) - add interpreter/plugin-scripts to be sourced at the beginning or end (can use dracut-functions)
- add mechanism for module specific command line options - add mechanism for module specific command line options

17
dracut.sh

@ -830,7 +830,7 @@ if [[ $hostonly ]]; then
# in hostonly mode, determine all devices, which have to be accessed # in hostonly mode, determine all devices, which have to be accessed
# and examine them for filesystem types # and examine them for filesystem types


push host_mp \ for mp in \
"/" \ "/" \
"/etc" \ "/etc" \
"/usr" \ "/usr" \
@ -838,9 +838,8 @@ if [[ $hostonly ]]; then
"/usr/sbin" \ "/usr/sbin" \
"/usr/lib" \ "/usr/lib" \
"/usr/lib64" \ "/usr/lib64" \
"/boot" "/boot";

do
for mp in "${host_mp[@]}"; do
mountpoint "$mp" >/dev/null 2>&1 || continue mountpoint "$mp" >/dev/null 2>&1 || continue
push host_devs $(readlink -f "/dev/block/$(find_block_device "$mp")") push host_devs $(readlink -f "/dev/block/$(find_block_device "$mp")")
done done
@ -856,11 +855,19 @@ if [[ $hostonly ]]; then
[[ "$_d" == UUID\=* ]] && _d="/dev/disk/by-uuid/${_d#UUID=}" [[ "$_d" == UUID\=* ]] && _d="/dev/disk/by-uuid/${_d#UUID=}"
[[ "$_d" == LABEL\=* ]] && _d="/dev/disk/by-label/$_d#LABEL=}" [[ "$_d" == LABEL\=* ]] && _d="/dev/disk/by-label/$_d#LABEL=}"
[[ "$_d" -ef "$dev" ]] || continue [[ "$_d" -ef "$dev" ]] || continue

while read _mapper _a _p _o; do
[[ $_mapper = \#* ]] && continue
[[ "$_d" -ef /dev/mapper/"$_mapper" ]] || continue
[[ "$_o" ]] || _o="$_p"
# skip mkswap swap
[[ $_o == *swap* ]] && continue 2
done < /etc/crypttab

push host_devs $(readlink -f $dev) push host_devs $(readlink -f $dev)
break break
done < /etc/fstab done < /etc/fstab
done < /proc/swaps done < /proc/swaps

fi fi


_get_fs_type() ( _get_fs_type() (

Loading…
Cancel
Save