From a4fcd7c7353cbf03bd6d5304314bfcdfeca5c03c Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 5 Jul 2007 14:52:06 +0000 Subject: introduce has_label() function --- rescue/Flash/scripts/rescue_common | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'rescue/Flash') diff --git a/rescue/Flash/scripts/rescue_common b/rescue/Flash/scripts/rescue_common index d09a3de1c..676a955da 100644 --- a/rescue/Flash/scripts/rescue_common +++ b/rescue/Flash/scripts/rescue_common @@ -1,22 +1,31 @@ #!/bin/bash function detect_version() { + if has_label Share; then + version="1.0" + else + version="1.05" + fi +} + +function has_label() { + local _label _tmpdir + _label=$1 _tmpdir="/tmp/$$" mkdir -p $_tmpdir nash --force > /dev/null 2>&1 < /dev/null rmdir $_tmpdir 2> /dev/null + + return $rc } function check_vendor() { -- cgit v1.2.1