← Back to team overview

ubuntu-phone team mailing list archive

Re: [PATCH v2] ubuntu_chroot: introduce init for starting uchroot

 

On 04/04/2013 08:58 PM, Mathieu Trudel-Lapierre wrote:

Signed-off-by: Mathieu Trudel-Lapierre <mathieu-tl@xxxxxxxxxx>
---
  ubuntu_chroot | 15 +++++++--------
  1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/ubuntu_chroot b/ubuntu_chroot
index 0127e7d..e12a77f 100644
--- a/ubuntu_chroot
+++ b/ubuntu_chroot
@@ -90,14 +90,13 @@ launch_shell()
      exec $CHROOT $ROOT /bin/bash -c su -
  }

-if [ "$1" == "shell" ]
-then
-    launch_shell
-elif [ -n "$1" ]
-then
-    echo "[shell] is the only supported argument"
-else
+case $1 in
+"init")
      setup_mounts
      enable_swap
      launch_uchroot
-fi
+    ;;
+*)
+    launch_shell
+    ;;
+esac


Applied, thanks.

Cheers,
--
Ricardo Salveti de Araujo


References