From f170e593629ff1eed4761dc784a3a6bb5f07f2e7 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 5 Jul 2007 14:55:53 +0000 Subject: add source_version_variables() to get version-specific variables --- rescue/Flash/scripts/rescue_common | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'rescue/Flash') diff --git a/rescue/Flash/scripts/rescue_common b/rescue/Flash/scripts/rescue_common index f8e657d72..b3fc7c8a8 100644 --- a/rescue/Flash/scripts/rescue_common +++ b/rescue/Flash/scripts/rescue_common @@ -9,6 +9,26 @@ function detect_version() { version="2.0" fi usbroot_device=$_device + source_version_variables +} + +function source_version_variables { + local _version + _version=$1 + [ -z "$_version" ] && _version=$version + if [ "$_version" = "1.0" ]; then + label=MDVUSBROOT + boot_rel="/boot" + loopbacks_rel="/loopbacks" + elif [ "$_version" = "1.05" ]; then + label=MDVUSBROOT + boot_rel="/.boot" + loopbacks_rel="/.loopbacks" + elif [ "$_version" = "2.0" ]; then + label=MDV_FLASH + boot_rel="/.boot" + loopbacks_rel="/.loopbacks" + fi } function has_label() { -- cgit v1.2.1