source: live-build/trunk/fuentes/scripts/build/lb_chroot_live-packages @ 900

Last change on this file since 900 was 900, checked in by kbut, 4 years ago

add original source

  • Property svn:executable set to *
File size: 2.1 KB
Line 
1#!/bin/sh
2
3## live-build(7) - System Build Scripts
4## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
5##
6## This program 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
11set -e
12
13# Including common functions
14( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
15
16# Setting static variables
17DESCRIPTION="$(Echo 'schedule live packages for installation')"
18HELP=""
19USAGE="${PROGRAM} [--force]"
20
21Arguments "${@}"
22
23# Reading configuration files
24Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
25Set_defaults
26
27# Requiring stage file
28Require_stagefile .build/config .build/bootstrap
29
30# Checking stage file
31Check_stagefile .build/chroot_live-packages
32
33# Checking lock file
34Check_lockfile .lock
35
36# Creating lock file
37Create_lockfile .lock
38
39# Queue installation of live-boot
40if [ -n "${LB_INITRAMFS}" ] && [ "${LB_INITRAMFS}" != "none" ]
41then
42        _PACKAGES="${LB_INITRAMFS}"
43fi
44
45# Queue installation of live-config
46if [ -n "${LB_INITSYSTEM}" ] && [ "${LB_INITSYSTEM}" != "none" ]
47then
48        _PACKAGES="${_PACKAGES} live-config live-config-${LB_INITSYSTEM}"
49fi
50
51# Do initsystem specific hacks
52if [ -n "${LB_INITSYSTEM}" ] && [ "${LB_INITSYSTEM}" != "sysvinit" ]
53then
54        # lets see if we still need the squeeze's "pre init system policy discussion" hack:
55        IS_SYSVINIT_ESSENTIAL="$(Chroot chroot dpkg-query --show --showformat='${Essential}\n' sysvinit)"
56        RC="$?"
57
58        if [ "${IS_SYSVINIT_ESSENTIAL}" != "no" ] && [ "${RC}" = "0" ]
59        then
60                # sysvinit is both installed and essential, ugly hack to remove it
61                Chroot chroot dpkg --force-remove-essential --remove sysvinit || true
62        fi
63fi
64
65# Install live packages
66if [ -n "${_PACKAGES}" ]
67then
68        case "${LB_APT}" in
69                apt|apt-get)
70                        Chroot chroot "apt-get ${APT_OPTIONS} install ${_PACKAGES}"
71                        ;;
72
73                aptitude)
74                        Chroot chroot "aptitude ${APTITUDE_OPTIONS} install ${_PACKAGES}"
75                        ;;
76        esac
77
78        # Creating stage file
79        Create_stagefile .build/chroot_live-packages
80fi
Note: See TracBrowser for help on using the repository browser.