projects
/
grml-debootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
chroot-script: put installation of kernel before installing additional packages
[grml-debootstrap.git]
/
chroot-script
diff --git
a/chroot-script
b/chroot-script
index
2b3e1ef
..
8f545cf
100755
(executable)
--- a/
chroot-script
+++ b/
chroot-script
@@
-17,10
+17,10
@@
set -e # exit on any error
# use aptitude only if it's available
if [ -x /usr/bin/aptitude ] ; then
# use aptitude only if it's available
if [ -x /usr/bin/aptitude ] ; then
- APTINSTALL=
'aptitude -y --without-recommends install '
+ APTINSTALL=
"aptitude -y --without-recommends install $DPKG_OPTIONS"
APTUPDATE='aptitude update'
else
APTUPDATE='aptitude update'
else
- APTINSTALL=
'apt-get --force-yes -y install'
+ APTINSTALL=
"apt-get --force-yes -y install $DPKG_OPTIONS"
APTUPDATE='apt-get update'
fi
APTUPDATE='apt-get update'
fi
@@
-47,12
+47,14
@@
stage() {
# define chroot mirror {{{
chrootmirror() {
[ -n "$KEEP_SRC_LIST" ] && return
# define chroot mirror {{{
chrootmirror() {
[ -n "$KEEP_SRC_LIST" ] && return
+ [ -z "$COMPONENTS" ] && COMPONENTS='main contrib non-free'
+
if [ -n "$ISO" ] ; then
if [ -n "$ISO" ] ; then
- echo "deb $ISO $RELEASE
main contrib
" > /etc/apt/sources.list
- [ -n "$MIRROR" ] && echo "deb $MIRROR $RELEASE
main contrib non-free" >> /etc/apt/sources.list
+ echo "deb $ISO $RELEASE
$COMPONENTS
" > /etc/apt/sources.list
+ [ -n "$MIRROR" ] && echo "deb $MIRROR $RELEASE
$COMPONENTS" >> /etc/apt/sources.list || /bin/true
else
if [ -n "$MIRROR" ] ; then
else
if [ -n "$MIRROR" ] ; then
- echo "deb $MIRROR $RELEASE
main contrib non-free
" > /etc/apt/sources.list
+ echo "deb $MIRROR $RELEASE
$COMPONENTS
" > /etc/apt/sources.list
fi
fi
}
fi
fi
}
@@
-361,7
+363,12
@@
hostname() {
# generate initrd/initramfs {{{
initrd() {
# assume the first available kernel as our main kernel
# generate initrd/initramfs {{{
initrd() {
# assume the first available kernel as our main kernel
- KERNELIMG=$(ls -1 /boot/vmlinuz-* | head -1)
+ KERNELIMG=$(ls -1 /boot/vmlinuz-* 2>/dev/null | head -1)
+ if [ -z "$KERNELIMG" ] ; then
+ echo 'No kernel image found, skipping initrd stuff.'>&2
+ return
+ fi
+
KERNELVER=${KERNELIMG#/boot/vmlinuz-}
# generate initrd
KERNELVER=${KERNELIMG#/boot/vmlinuz-}
# generate initrd
@@
-462,7
+469,7
@@
finalize() {
# execute the functions {{{
for i in chrootmirror grmlrepos kernelimg_conf makedev install_policy_rcd \
# execute the functions {{{
for i in chrootmirror grmlrepos kernelimg_conf makedev install_policy_rcd \
-
packages extrapackages mkinitrd kernel
reconfigure hosts interfaces \
+
kernel packages extrapackages mkinitrd
reconfigure hosts interfaces \
timezone fstab hostname initrd grub passwords custom_scripts services ; do
if stage $i ; then
$i && stage $i done || exit 1
timezone fstab hostname initrd grub passwords custom_scripts services ; do
if stage $i ; then
$i && stage $i done || exit 1