~smoser/maas-images/trunk.lp1582410

« back to all changes in this revision

Viewing changes to bin/kpack-from-image

  • Committer: Scott Moser
  • Date: 2016-03-01 15:23:50 UTC
  • Revision ID: smoser@ubuntu.com-20160301152350-r41fdsta0lwept2z
kpack-from-image: remove workaround for 1536810

The current linux-image packages are fixed, so we
no longer have to do this workaround.

Show diffs side-by-side

added added

removed removed

Lines of Context:
240
240
    "$@"
241
241
}
242
242
 
243
 
fix_kernel_img_conf() {
244
 
    # remove link_in_boot=yes for LP: #1536810
245
 
    local root="${1:-/}"
246
 
    local kimg_conf="/etc/kernel-img.conf"
247
 
    local kfpath="${root%/}${kimg_conf}"
248
 
    if [ ! -f "$kfpath" ]; then
249
 
        debug 1 "${kimg_conf}: did not exist. not modifying."
250
 
        return 0
251
 
    fi
252
 
    if ! grep -qi "^link_in_boot.*yes" "${kfpath}"; then
253
 
        debug 1 "$kimg_conf: 'link_in_boot = yes' not found. not modifying."
254
 
        return 0
255
 
    fi
256
 
    debug 1 "${kimg_conf}: disabling 'link_in_boot=yes'"
257
 
    sed -i '/^link_in_boot = [Yy][Ee][Ss]/d' "$kfpath"
258
 
    return
259
 
}
260
 
 
261
243
chrooted() {
262
244
    # this is expected to run chrooted inside the root
263
245
    # installs all packages (arguments), writes kernel
319
301
    ensure_iscsi_initramfs_support / ||
320
302
        { error "failed to enable iscsi initramfs support"; return 1; }
321
303
 
322
 
    fix_kernel_img_conf / ||
323
 
        { error "failed to fix kernel-img.conf"; return 1; }
324
 
 
325
304
    clean_local_udev_rules / ||
326
305
        { error "failed configuring additional modules!"; return 1; }
327
306