-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-setupimage
executable file
·45 lines (39 loc) · 1.37 KB
/
create-setupimage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Cloudy: An open LAMP benchmark suite
# Copyright (C) 2010 Adam Litke, IBM Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#######################################################################
# create-setupimage - Create an ISO image with VM setup instructions. #
#######################################################################
rm -f setupimage/config
while [ $# -gt 0 ]; do
OPT=$1
ARG="$2"
shift; shift
case $OPT in
-v) echo "$ARG" >> setupimage/config ;;
-o) OUTFILE=$ARG
esac
done
#echo "NAME=$NAME" > setupimage/config
# AGLITKE-custom
#echo "DURATION=300" >> setupimage/config
echo "Using config:"
cat setupimage/config
mkisofs --quiet -J -o $OUTFILE setupimage
if [ $? -ne 0 ]; then
echo "Setup ISO creation failed! Aborting."
exit 1
fi