Revision e21b8802 common.sh.in

b/common.sh.in
94 94
}
95 95

  
96 96
format_disk0() {
97
  # Create three partitions:
98
  # 1 - 100MB /boot, bootable
99
  # 2 - Size of Memory, swap
100
  # 3 - Rest
101
  $SFDISK -uM -H 255 -S 63 --quiet --Linux "$1" <<EOF
97
    if [ "${SWAP}" = "yes" ] ; then
98
        # Create three partitions:
99
        # 1 - 100MB /boot, bootable
100
        # 2 - Size of Memory, swap
101
        # 3 - Rest
102
        $SFDISK -uM -H 255 -S 63 --quiet --Linux "$1" <<EOF
102 103
,100,L,*
103 104
,$INSTANCE_BE_memory,S
104 105
,,L
105 106
EOF
107
    else
108
        # Create two partitions:
109
        # 1 - 100MB /boot, bootable
110
        # 2 - Rest
111
        $SFDISK -uM -H 255 -S 63 --quiet --Linux "$1" <<EOF
112
,100,L,*
113
,,L
114
EOF
115
    fi
106 116
}
107 117

  
108 118
mount_disk0() {
......
159 169
# only if the user want to specify a mirror in the defaults file we
160 170
# will use it, this declaration is to make sure the variable is set
161 171
: ${CDINSTALL:="yes"}
172
: ${SWAP:="yes"}
162 173
: ${IMAGE_NAME:=""}
163 174
: ${IMAGE_TYPE:="qemu"}
164 175
: ${ARCH:=""}

Also available in: Unified diff