Revision c3e07762
b/defaults | ||
---|---|---|
29 | 29 |
# The scripts are executed using run-parts |
30 | 30 |
# By default /etc/ganeti/instance-image.d |
31 | 31 |
# CUSTOMIZE_DIR="/etc/ganeti/instance-image.d" |
32 |
|
|
33 |
# GRUB_SETUP: Setup grub to work on a tarball based image. You need to set the |
|
34 |
# executable bit for gurb in the custom directory first. |
|
35 |
# GRUB_SETUP=no |
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