~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to debian/templates/temp.image.plain/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
my $relink_build_link = 'YES'; # There is no harm in checking the link
27
27
my $force_build_link  = '';    # There is no harm in checking the link
28
28
my $kernel_arch       = "=B";
29
 
my $ramdisk           = "=MK";  # List of tools to create initial ram fs.
 
29
my $ramdisk           = '';
30
30
my $package_name      = "linux-image-$version";
31
 
my $explicit_do_loader = '';
32
31
 
33
32
#known variables
34
33
my $image_dest      = "/";
69
68
      $do_symlink      = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/i;
70
69
      $no_symlink      = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/i;
71
70
      $link_in_boot    = "Yes" if /link_in_boot\s*=\s*(yes|true|1)\s*$/i;
72
 
      $explicit_do_loader = "YES" if /do_bootloader\s*=\s*(yes|true|1)\s*$/i;
73
71
      $use_hard_links  = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/i;
74
72
      $minimal_swap    = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/i;
75
73
      $ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/i;
704
702
}
705
703
 
706
704
 
707
 
sub find_initramfs_tool {
708
 
        my $ramdisk = shift;
709
 
        my (@tools, $initramfs_cmd);
710
 
 
711
 
        foreach $initramfs_cmd  (split(/[:,\s]+/, $ramdisk)) {
712
 
                if (system("test -x \"\$(command -v $initramfs_cmd)\"") == 0) {
713
 
                        push(@tools, $initramfs_cmd);
714
 
                }
715
 
        }
716
 
        return @tools;
717
 
}
718
 
 
719
 
 
720
 
if ($initrd) {
721
 
my @ramdisklist;
722
 
@ramdisklist = find_initramfs_tool($ramdisk) if $ramdisk;
723
 
die "Failed to find suitable initramfs generation tool in $ramdisk\n"
724
 
      if $#ramdisklist < 0;
725
 
my $success = 0;
726
 
for my $ramdisk_cmd (@ramdisklist) {
727
 
    print STDERR "Running $ramdisk_cmd.\n";
728
 
    print STDERR "Other valid candidates: @ramdisklist\n" if $#ramdisklist > 0;
729
 
 
730
 
    my $initrd_path = $realimageloc . "initrd.img-$version";
731
 
    my $ret = system("$ramdisk_cmd " .
732
 
                     ($mkimage ? "-m '$mkimage' " : "") .
733
 
                     "-c -t -k $version >&2");
734
 
    if ($ret) {
735
 
      warn "$ramdisk_cmd failed to create initrd image.\n";
736
 
    } else {
737
 
        $success = 1;
738
 
        last;
739
 
    }
740
 
}
741
 
die "Failed to create initrd image.\n" unless $success;
742
 
if (! defined $ARGV[1] || ! $ARGV[1] || $ARGV[1] =~ m/<unknown>/o) {
743
 
    image_magic("initrd.img", $image_dest);
744
 
} else {
745
 
    if (! -e "initrd.img") {
746
 
      handle_missing_link("initrd.img", $image_dest, "initrd.img-$version",
747
 
                          $realimageloc);
748
 
    }
749
 
}
 
705
# Warn if we are ignoring the old ramdisk setting
 
706
if ($ramdisk =~ /\S/) {
 
707
    my ($question, $ret, $seen);
 
708
    $question = "${package_name}/postinst/ignoring-ramdisk";
 
709
    ($ret,$seen) = input('high', "$question");
 
710
    die "Error setting debconf question $question: $seen" if $ret && $ret != 30;
 
711
    ($ret,$seen) = go();
 
712
    die "Error asking debconf question $question: $seen" if $ret && $ret != 30;
750
713
}
751
714
 
752
715
# Only change the symlinks if we are not being upgraded
753
716
if (! defined $ARGV[1] || ! $ARGV[1] || $ARGV[1] =~ m/<unknown>/o) {
754
717
  image_magic($kimage, $image_dest);
 
718
  if ($initrd) {
 
719
    image_magic("initrd.img", $image_dest);
 
720
  }
755
721
}
756
722
else {
757
723
  if (! -e "$kimage") {
758
724
    handle_missing_link($kimage, $image_dest, "$kimage-$version", 
759
725
                        $realimageloc);
760
726
  }
 
727
  if ($initrd && ! -e "initrd.img") {
 
728
    handle_missing_link("initrd.img", $image_dest, "initrd.img-$version",
 
729
                        $realimageloc);
 
730
  }
761
731
}
762
732
 
763
733
# set the env var stem
812
782
            die "Failed to process /etc/kernel/postinst.d/$version";
813
783
}
814
784
 
815
 
if ($explicit_do_loader) {
816
 
    my ($question, $ret, $seen);
817
 
    $question = "${package_name}/postinst/ignoring-do-bootloader-$version";
818
 
    ($ret,$seen) = input('high', "$question");
819
 
    die "Error setting debconf question $question: $seen" if $ret && $ret != 30;
820
 
    ($ret,$seen) = go();
821
 
    die "Error asking debconf question $question: $seen" if $ret && $ret != 30;
822
 
}
823
 
 
824
785
exit 0;
825
786
 
826
787
__END__