From 524a1b0a3e0eb61f45ce57f18410ba5ec8224b0d Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 5 Mar 2012 11:00:11 +0000 Subject: setup-disk: cleanup. use shell manipulation instead of sed --- setup-disk.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup-disk.in b/setup-disk.in index 17f9a56..0ae83de 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -204,7 +204,7 @@ install_mounted_root() { [ -e "/sys/block/${dev#/dev/}/md" ] || continue local md=${dev#/dev/} - initfs_features="$(echo $initfs_features | sed 's/raid//') raid" + initfs_features="${initfs_features% raid} raid" local level=$(cat /sys/block/$md/md/level) case "$level" in raid1) raidmod="$raidmod,$level";; @@ -215,7 +215,7 @@ install_mounted_root() { # check if we need hardware raid drivers case $rootdev in /dev/cciss/*) - initfs_features="$(echo $initfs_features | sed 's/raid//') raid" + initfs_features="${initfs_features% raid} raid" ;; esac -- cgit v1.2.3