[SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (278c18f59719582ea5812d5b24f1c9c672fb8f26)

Justin Boffemmyer scm at sourcemage.org
Fri Feb 22 21:33:06 EST 2008


GIT changes to master cauldron by Justin Boffemmyer <flux at sourcemage.org>:

 iso/usr/share/doc/smgl.install/steps/user-setup |    3 ++-
 iso/usr/share/smgl.install/bashrc               |    5 ++++-
 iso/usr/share/smgl.install/smgl-chroot          |   18 +++---------------
 3 files changed, 9 insertions(+), 17 deletions(-)

New commits:
commit 9baa27528490ecb409423bea062d6e23edfdc87d
Author: Justin Boffemmyer <flux at sourcemage.org>
Commit: Justin Boffemmyer <flux at sourcemage.org>

    smgl-chroot: corrected checks for exit status
    
    Instead of using an exit status variable, the code now accesses exit
    statuses directly using $?. This additionally helps to avoid errors in
    the code where the rc variable didn't get set by accident. Thanks to
    Jaka for the suggestions for this fix.

commit 85cebeb59a9fbda41280a95cc1379a01b5848e9b
Author: Justin Boffemmyer <flux at sourcemage.org>
Commit: Justin Boffemmyer <flux at sourcemage.org>

    bashrc: improved jump() to output todo info
    
    Calling jump() will now output todo info via a call to todo(). I also
    changed the loop code to use a while instead of a for because it looks
    cleaner now.

commit ed3b5c391021dc4bd9598e1f93083b077f17b392
Author: Justin Boffemmyer <flux at sourcemage.org>
Commit: Justin Boffemmyer <flux at sourcemage.org>

    steps/user-setup: fixed the info for the useradd command
    
    Added some flags to the example useradd command to correct it so that
    home dirs are created at /home instead of /home/users, and so that new
    users are created with GID 1000. Users should be able to follow the
    format of the example to modify it if they want behavior other than
    the default represented in the example.

diff --git a/iso/usr/share/doc/smgl.install/steps/user-setup b/iso/usr/share/doc/smgl.install/steps/user-setup
index c07834b..6a6f027 100644
--- a/iso/usr/share/doc/smgl.install/steps/user-setup
+++ b/iso/usr/share/doc/smgl.install/steps/user-setup
@@ -13,7 +13,8 @@ passwd root
 
 If you would like to add additional users at this time, you may feel free
 to do so by typing the following:
-useradd -m USERNAME
+useradd -g 1000 -b /home -m USERNAME
+passwd USERNAME
 
 Replace USERNAME with the username you want to add. After you are done,
 make sure you exit the chroot:
diff --git a/iso/usr/share/smgl.install/bashrc b/iso/usr/share/smgl.install/bashrc
index 92f5d15..9d3f3d2 100755
--- a/iso/usr/share/smgl.install/bashrc
+++ b/iso/usr/share/smgl.install/bashrc
@@ -91,15 +91,18 @@ function jump() {
   local i
   local good=0
 
-  for i in $(cat $INSTALLER_DATA/steps | cut -d" " -f1)
+  cat $INSTALLER_DATA/steps | cut -d" " -f1 |
+  while read i
   do
     if [[ $* = $i ]]
     then
       good=1
       echo "$*" >$INSTALLER_STATUS
+      todo
       break
     fi
   done
+
   if [[ $good = 0 ]]
   then
     echo ""
diff --git a/iso/usr/share/smgl.install/smgl-chroot b/iso/usr/share/smgl.install/smgl-chroot
index ae72ecc..f1e9dda 100755
--- a/iso/usr/share/smgl.install/smgl-chroot
+++ b/iso/usr/share/smgl.install/smgl-chroot
@@ -1,7 +1,6 @@
 #!/bin/bash
 
 QUIET=
-rc=
 
 if [[ $# -gt 0 ]]
 then
@@ -26,14 +25,8 @@ else
   mount --bind /dev/pts /mnt/root/dev/pts && \
 	echo "mount --bind /dev /mnt/root/dev"  && \
   mount --bind /proc /mnt/root/proc
-fi
-
-rc=$?
+fi || exit $?
 
-if [[ $rc -gt 0 ]]
-then
-  exit $rc
-fi
 
 if [[ $QUIET = 1 ]]
 then
@@ -41,12 +34,7 @@ then
 else
   echo "Entering chroot..."
   chroot /mnt/root /bin/bash -l
-fi
-
-if [[ $rc -gt 0 ]]
-then
-  exit $rc
-fi
+fi || exit $?
 
 if [[ $QUIET = 1 ]]
 then
@@ -62,6 +50,6 @@ else
   umount /mnt/root/dev
 fi
 
-exit $rc
+exit $?
 
 # vim:sw=2:ts=2:softtabstop=2:expandtab:ai



More information about the SM-Commit mailing list