projects
/
grml-debootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support setting aptitude/apt-get options through $DPKG_OPTIONS
[grml-debootstrap.git]
/
chroot-script
diff --git
a/chroot-script
b/chroot-script
index
ac11325
..
3650c6f
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
@@
-363,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