dmraid/mkinitrd-setup.sh
Dr. Werner Fink 4101c712d5 Accepting request 184080 from home:olh:branches:Base:System
- Remove usage of absolute paths in initrd
- Remove some checks from mkinitrd scripts, they are always true
- List all used binaries in programs tag

OBS-URL: https://build.opensuse.org/request/show/184080
OBS-URL: https://build.opensuse.org/package/show/Base:System/dmraid?expand=0&rev=30
2013-07-24 14:43:23 +00:00

29 lines
599 B
Bash

#!/bin/bash
#
#%stage: devicemapper
#%provides: dmroot
#
if [ -x "$(type -p dmsetup)" ] ; then
newbd=
for bd in $blockdev ; do
update_blockdev $bd
if [ "$blockdriver" = device-mapper ]; then
dm_uuid=$(dmsetup info -c --noheadings -o uuid -j $blockmajor -m $blockminor)
dm_creator=${dm_uuid%-*}
if [ "$dm_creator" = "DMRAID" ]; then
tmp_root_dm=1 # dmraid needs dm
root_dmraid=1
newbd="$newbd $(echo $bd | sed 's/\([a-z]\)[0-9]*$/\1/')"
else
newbd="$newbd $bd"
fi
else
newbd="$newbd $bd"
fi
done
blockdev="$newbd"
fi
save_var root_dmraid