Revision c3e07762 example/instance-image.d/grub
b/example/instance-image.d/grub | ||
---|---|---|
1 | 1 |
#!/bin/bash |
2 | 2 |
# This is an example script that configures, grub after installation. This |
3 | 3 |
# script assumes that grub has been installed onto the image already and a |
4 |
# working grub.conf exists. To use, make it executable and edit your settings |
|
5 |
# to the following: |
|
6 |
# |
|
7 |
# GRUB_SETUP="yes" |
|
4 |
# working grub.conf exists. This is only enabled if using the tarball image |
|
5 |
# type. |
|
8 | 6 |
|
9 | 7 |
set -e |
10 | 8 |
|
... | ... | |
14 | 12 |
|
15 | 13 |
trap cleanup EXIT |
16 | 14 |
|
15 |
if [ "${IMAGE_TYPE}" != "tarball" ] ; then |
|
16 |
echo "Image type not \'tarball\', skipping setting up grub..." |
|
17 |
exit 0 |
|
18 |
fi |
|
19 |
|
|
17 | 20 |
if [ -z "${TARGET}" -o -d "${TARGET}" ] ; then |
18 | 21 |
echo "Missing target directory" |
19 | 22 |
exit 1 |
Also available in: Unified diff