[issue650] live-module revision 1.7

Tong Sun bts at bts.grml.org
Fri Jan 15 21:13:13 CET 2010


Tong Sun <suntong at cpan.org> added the comment:

- 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

----------
assignedto: mika
messages: 2035, 2036, 2045, 2046, 2047, 2048, 2049, 2398, 2839, 2840, 2841, 2842, 2843, 2844, 2845
nosy: mika, suntong
priority: feature
status: need-eg
title: live-module revision 1.7

_____________________________________
GRML issue tracker <bts at bts.grml.org>
<http://bts.grml.org/grml/issue650>
_____________________________________


More information about the Bugs-changes mailing list