BTS

Message2845

Author suntong1
Recipients mika, suntong, suntong1
Date 2010-01-15.20:13:13
Content
- tests fine.
- ready for first publish.
---
 bin/live-module |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/bin/live-module b/bin/live-module
index e38ab29..7eb5501 100755
--- a/bin/live-module
+++ b/bin/live-module
@@ -142,8 +142,6 @@ insert_module() {
 # remove the module from root aufs
 remove_module() {
 
-  set -x
-
   # Try to simply remove the dir first. If succeeds, finish
   rmdir "${croot}/${imagename}" 2>/dev/null && exit 0
   # OK the previous trick didn't work. So we have a real module here.
@@ -237,6 +235,12 @@ image="${1}"
 imagename=$(basename "${image}")
 croot=""
 
+[ -e "$image" ] || {
+  echo "The specified module file '$image' does not exist." 
+  exit 4
+}
+
+
 # FIXME: port the following after bug 506591 has been fixed
 # Test whether the module file is stored in union
 # if yes, then we must move it somewhere else (to RAM) else it can't be added
-- 
1.5.6.5
History
Date User Action Args
2010-01-15 20:13:13suntong1setrecipients: + mika
2010-01-15 20:13:13suntong1linkissue650 messages
2010-01-15 20:13:13suntong1create