--mount "[DEV] [MP] [FSTYPE] [FSOPTS]"
Mount device [DEV] on mountpoint [MP] with filesystem
[FSTYPE] and options [FSOPTS] in the initramfs
+ --device "[DEV]" Bring up [DEV] in initramfs
-i, --include [SOURCE] [TARGET]
Include the files in the SOURCE directory into the
Target directory in the final initramfs.
--long fscks: \
--long add-fstab: \
--long mount: \
+ --long device: \
--long nofscks: \
--long ro-mnt \
--long kmoddir: \
--fscks) push fscks_l "$2"; shift;;
--add-fstab) push add_fstab_l "$2"; shift;;
--mount) push fstab_lines "$2"; shift;;
+ --device) push host_devs "$2"; shift;;
--nofscks) nofscks_l="yes";;
--ro-mnt) ro_mnt_l="yes";;
-k|--kmoddir) drivers_dir_l="$2"; shift;;
dinfo "*** Including modules done ***"
+get_persistent_dev() {
+ local i _tmp
+ local _dev=${1##*/}
+
+ for i in /dev/disk/by-id/*; do
+ _tmp=$(readlink $i)
+ [ "${_tmp##*/}" = "$_dev" ] && echo $i && return
+ done
+}
+
+## save host_devs which we need bring up
+for _dev in ${host_devs[@]}; do
+ _pdev=$(get_persistent_dev $_dev)
+ [ -n "$_pdev" ] && echo $_pdev >> $initdir/etc/host_devs
+done
+
## final stuff that has to happen
if [[ $no_kernel != yes ]]; then