[issue650] live-module revision 1.5

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


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

- misc cosmetic fixes
---
 bin/live-module |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/bin/live-module b/bin/live-module
index 0564bf3..453800d 100755
--- a/bin/live-module
+++ b/bin/live-module
@@ -12,7 +12,7 @@
 . /usr/share/initramfs-tools/scripts/functions
 . /usr/share/initramfs-tools/scripts/live
 
-# FIXME: move the functions from above line and the followings into a separated lib file
+# FIXME: move the functions from above line and the followings into a central lib file
 
 # Insert a directory tree $2 to an union specified by $1
 # Top-level read-write branch is specified by it's index 0
@@ -75,9 +75,9 @@ Options:
   -u, --pull     pull-out the module (synonym for remove)
 
   -h, --help     Print usage information and exit
-  -V, --version  Show version information and exit
 "
 }
+#  -V, --version  Show version information and exit
 
 parameter_error() {
   echo "Try 'live-module --help' for more information."
@@ -87,6 +87,10 @@ parameter_error() {
 # insert the module into root aufs
 insert_module() {
   mount_image "$image"
+
+  # FIXME: port the following after bug 506591 has been fixed: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506591
+  # update ld cache if new ld.so.conf/cache exists in the module
+  # 'invoke-rc.d daemon start' for all daemons within this module
 }
 
 # remove the module from root aufs
@@ -108,7 +112,7 @@ remove_module() {
 
 
   # if we are here, the module has been successfuly removed from aufs union
-  # so now we have to umount the lzm file and then free the loop device
+  # so now we have to umount the module and then free the loop device
   LOOP=$(cat /proc/mounts | grep "${croot}/${imagename} " | cut -d " " -f 1)
   umount -n "${croot}/${imagename}" 2>/dev/null
   if [ $? -ne 0 ]; then
@@ -121,6 +125,12 @@ remove_module() {
 # ============================================================ &pclp ===
 # .................................. process command line parameters ...
 
+# @WARNING: 
+# The following is use for the *command line logic* processing. It should be 
+# as dumb as possible. I.e., it should NOT be more complicated than
+# copy-paste-and-rename from existing code. All *business-logic* processing
+# should be handled in main, where it belongs.
+  
 _opt_temp=`getopt --name live-module -o +irpuhV --long \
     ins,rem,plug,pull,help,version \
   -- "$@"`
@@ -175,6 +185,7 @@ croot=""
 
 # == Main dispatch
 
+# business-logic for command line parameter-processing
 if [ "$_opt_plug" ]; then 
   insert_module
 elif [ "$_opt_pull" ]; then 
@@ -186,3 +197,5 @@ fi
 
 exit 0
 
+# ============================================================== &ss ===
+# :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: end :::
-- 
1.5.6.5

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

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


More information about the Bugs-changes mailing list