projects
/
grml-debootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make sure grub-pc is installed when grub option is used
[grml-debootstrap.git]
/
chroot-script
diff --git
a/chroot-script
b/chroot-script
index
84086cc
..
7d2c8c3
100755
(executable)
--- a/
chroot-script
+++ b/
chroot-script
@@
-92,7
+92,6
@@
grmlrepos() {
# user might have provided their own apt sources.list
if ! grep -q grml /etc/apt/sources.list.d/grml.list 2>/dev/null ; then
cat >> /etc/apt/sources.list.d/grml.list << EOF
# user might have provided their own apt sources.list
if ! grep -q grml /etc/apt/sources.list.d/grml.list 2>/dev/null ; then
cat >> /etc/apt/sources.list.d/grml.list << EOF
-
# grml: stable repository:
deb http://deb.grml.org/ grml-stable main
deb-src http://deb.grml.org/ grml-stable main
# grml: stable repository:
deb http://deb.grml.org/ grml-stable main
deb-src http://deb.grml.org/ grml-stable main
@@
-100,7
+99,6
@@
grmlrepos() {
# grml: testing/development repository:
deb http://deb.grml.org/ grml-testing main
deb-src http://deb.grml.org/ grml-testing main
# grml: testing/development repository:
deb http://deb.grml.org/ grml-testing main
deb-src http://deb.grml.org/ grml-testing main
-
EOF
fi
EOF
fi
@@
-114,7
+112,7
@@
EOF
# why it's necessary, sometimes we get an error even though it works [mika]
fi
# why it's necessary, sometimes we get an error even though it works [mika]
fi
- # make sure we install packages from
g
rml's pool only if not available
+ # make sure we install packages from
G
rml's pool only if not available
# from Debian!
if ! grep -q grml /etc/apt/preferences 2>/dev/null ; then
cat >> /etc/apt/preferences << EOF
# from Debian!
if ! grep -q grml /etc/apt/preferences 2>/dev/null ; then
cat >> /etc/apt/preferences << EOF
@@
-423,6
+421,11
@@
grub_install() {
return 0
fi
return 0
fi
+ if ! dpkg --list grub-pc 2>/dev/null | grep -q '^ii' ; then
+ echo "Notice: grub option set but no grub-pc package, installing it therefore."
+ DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL grub-pc
+ fi
+
if ! [ -x "$(which grub-install)" ] ; then
echo "Error: grub-install not available. (Error while installing grub package?)" >&2
return 1
if ! [ -x "$(which grub-install)" ] ; then
echo "Error: grub-install not available. (Error while installing grub package?)" >&2
return 1