~tom-gall/live-build/integrate-linaro-media-create

« back to all changes in this revision

Viewing changes to helpers/chroot_interactive

  • Committer: Daniel Baumann
  • Date: 2011-03-09 18:17:15 UTC
  • Revision ID: git-v1:74c3ad26d5d710282da6f51b746a33ad6370b8ce
Rearranging helpers scripts in source tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
# lh_chroot_interactive(1) - make build interactive
4
 
# Copyright (C) 2006-2010 Daniel Baumann <daniel@debian.org>
5
 
#
6
 
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7
 
# This is free software, and you are welcome to redistribute it
8
 
# under certain conditions; see COPYING for details.
9
 
 
10
 
set -e
11
 
 
12
 
# Including common functions
13
 
. "${LH_BASE:-/usr/share/live-helper}"/live-helper.sh
14
 
 
15
 
# Setting static variables
16
 
DESCRIPTION="$(Echo 'make build interactive')"
17
 
HELP=""
18
 
USAGE="${PROGRAM} [--force]"
19
 
 
20
 
Arguments "${@}"
21
 
 
22
 
# Reading configuration files
23
 
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24
 
Set_defaults
25
 
 
26
 
if [ "${LH_INTERACTIVE}" = "false" ]
27
 
then
28
 
        exit 0
29
 
fi
30
 
 
31
 
Echo_message "Begin interactive build..."
32
 
 
33
 
# Requiring stage file
34
 
Require_stagefile .stage/config .stage/bootstrap
35
 
 
36
 
# Checking stage file
37
 
Check_stagefile .stage/chroot_interactive
38
 
 
39
 
# Checking lock file
40
 
Check_lockfile .lock
41
 
 
42
 
# Creating lock file
43
 
Create_lockfile .lock
44
 
 
45
 
case "${LH_INTERACTIVE}" in
46
 
        true|shell)
47
 
                Echo_message "Pausing build: starting interactive shell..."
48
 
                        Chroot chroot "/bin/bash --login"
49
 
                ;;
50
 
                x11)
51
 
                Echo_message "Pausing build: starting interactive X11..."
52
 
                        Chroot chroot "startx"
53
 
                ;;
54
 
                xnest)
55
 
                Echo_message "Pausing build: starting interactive Xnest..."
56
 
                        #Chroot chroot "" # FIXME
57
 
                ;;
58
 
esac
59
 
 
60
 
# Creating stage file
61
 
Create_stagefile .stage/chroot_symlinks