~ubuntu-branches/ubuntu/quantal/cloud-utils/quantal-201207121820

« back to all changes in this revision

Viewing changes to bin/growpart

  • Committer: Scott Moser
  • Date: 2012-07-12 17:19:17 UTC
  • Revision ID: smoser@ubuntu.com-20120712171917-9j3nk0kwycjos8mp
unapply patches, get back to trunk 0.25

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
cleanup() {
30
30
        if [ -n "${RESTORE_FROM}" ]; then
31
31
                error "***** WARNING: Resize failed, attempting to revert ******"
32
 
                if sfdisk --no-reread "${DISK}" ${CHS} -I "${RESTORE_FROM}"; then
 
32
                if sfdisk "${DISK}" ${CHS} -I "${RESTORE_FROM}"; then
33
33
                        error "***** Appears to have gone OK ****"
34
34
                else
35
35
                        error "***** FAILED! or original partition table looked like: ****"
112
112
trap cleanup EXIT
113
113
 
114
114
change_out=${TEMP_D}/change.out
 
115
change_err=${TEMP_D}/change.err
115
116
dump_out=${TEMP_D}/dump.out
116
117
new_out=${TEMP_D}/new.out
117
118
dump_mod=${TEMP_D}/dump.mod
180
181
    exit 0
181
182
fi
182
183
 
183
 
sfdisk --no-reread "${disk}" ${CHS} --force -O "${orig_bin}" \
184
 
        < "${new_out}" > "${change_out}" 2>&1 || {
 
184
sfdisk "${disk}" ${CHS} --force -O "${orig_bin}" \
 
185
        < "${new_out}" > "${change_out}" 2> "${change_err}" || {
185
186
        DISK=${disk}; RESTORE_FROM="${orig_bin}";
186
 
        error "attempt to resize ${disk} failed. sfdisk output below:"
187
 
        sed 's,^,| ,' "${change_out}" 1>&2
188
187
        fail "failed to resize"
189
188
}
190
189
changed "${change_info}"