~timrchavez/live-build/lb-sg-2.x-add-suppport-for-pxz

« back to all changes in this revision

Viewing changes to helpers/lh_chroot_linuximage

  • Committer: Daniel Baumann
  • Date: 2011-03-09 17:18:28 UTC
  • Revision ID: daniel@debian.org-20110309171828-3uxhgsqk5s3iz2h9
Adding live-helper 1.0~a2-1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
Set_defaults
17
17
 
18
18
# Requiring stage file
19
 
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap
 
19
Require_stagefile .stage/bootstrap
20
20
 
21
21
# Checking lock file
22
 
Check_lockfile "${LIVE_ROOT}"/.lock
 
22
Check_lockfile .lock
23
23
 
24
24
# Creating lock file
25
 
Create_lockfile "${LIVE_ROOT}"/.lock
 
25
Create_lockfile .lock
26
26
 
27
27
case "${1}" in
28
28
        install)
29
29
                # Checking stage file
30
 
                Check_stagefile "${LIVE_ROOT}"/.stage/chroot_linuximage
 
30
                Check_stagefile .stage/chroot_linuximage
31
31
 
32
 
                if [ -f "${LIVE_CHROOT}"/etc/kernel-img.conf ]
 
32
                if [ -f chroot/etc/kernel-img.conf ]
33
33
                then
34
34
                        # Saving kernel-img.conf
35
 
                        cp "${LIVE_CHROOT}"/etc/kernel-img.conf "${LIVE_CHROOT}"/etc/kernel-img.conf.old
 
35
                        cp chroot/etc/kernel-img.conf chroot/etc/kernel-img.conf.old
36
36
                fi
37
37
 
38
38
                # Configuring kernel-img.conf
39
 
                echo "do_initrd = Yes"  >> "${LIVE_CHROOT}"/etc/kernel-img.conf
 
39
                echo "do_initrd = Yes"  >> chroot/etc/kernel-img.conf
40
40
 
41
41
                # Creating stage file
42
 
                Create_stagefile "${LIVE_ROOT}"/.stage/chroot_linuximage
 
42
                Create_stagefile .stage/chroot_linuximage
43
43
 
44
44
                # Installing linux-image, modules and casper
45
45
                case "${LH_APT}" in
46
 
                        apt)
 
46
                        apt|apt-get)
47
47
                                Chroot "apt-get install --yes ${LIVE_KERNEL_PACKAGES}"
48
48
                                ;;
49
49
 
54
54
                ;;
55
55
 
56
56
        remove)
57
 
                if [ -f "${LIVE_CHROOT}"/etc/kernel-img.conf.old ]
 
57
                if [ -f chroot/etc/kernel-img.conf.old ]
58
58
                then
59
59
                        # Restoring kernel-img.conf file
60
 
                        mv "${LIVE_CHROOT}"/etc/kernel-img.conf.old "${LIVE_CHROOT}"/etc/kernel-img.conf
 
60
                        mv chroot/etc/kernel-img.conf.old chroot/etc/kernel-img.conf
61
61
                else
62
62
                        # Removing kernel-img.conf file
63
 
                        rm -f "${LIVE_CHROOT}"/etc/kernel-img.conf
 
63
                        rm -f chroot/etc/kernel-img.conf
64
64
                fi
65
65
 
66
66
                # Removing stage file
67
 
                rm -f "${LIVE_ROOT}"/.stage/chroot_linuximage
 
67
                rm -f .stage/chroot_linuximage
68
68
                ;;
69
69
 
70
70
        *)