summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-03-05 11:00:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-03-05 11:00:11 +0000
commit524a1b0a3e0eb61f45ce57f18410ba5ec8224b0d (patch)
tree46f17ed3e04ab0b11a55726360e18a5e53351fa3
parente271e0200716b4c8b0f880f918eeafc88f018a1c (diff)
downloadalpine-conf-524a1b0a3e0eb61f45ce57f18410ba5ec8224b0d.zip
setup-disk: cleanup. use shell manipulation instead of sed
-rw-r--r--setup-disk.in4
1 files 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