[kernel] r14035 - dists/trunk/linux-2.6/debian/templates/temp.image.plain

Maximilian Attems maks at alioth.debian.org
Mon Jul 27 13:15:15 UTC 2009


Author: maks
Date: Mon Jul 27 13:15:12 2009
New Revision: 14035

Log:
on review completly nuke config

this check makes no sense at all,
and also refers to a gone postinst template.

Modified:
   dists/trunk/linux-2.6/debian/templates/temp.image.plain/config

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/config
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/config	Mon Jul 27 12:27:56 2009	(r14034)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/config	Mon Jul 27 13:15:12 2009	(r14035)
@@ -1,136 +1,5 @@
-#! /usr/bin/perl
-#                              -*- Mode: Cperl -*- 
-# config --- 
-# Author           : Manoj Srivastava ( srivasta at glaurung.internal.golden-gryphon.com ) 
-# Created On       : Thu Nov  3 09:11:38 2005
-# Created On Node  : glaurung.internal.golden-gryphon.com
-# Last Modified By : Manoj Srivastava
-# Last Modified On : Thu Nov  3 09:11:38 2005
-# Last Machine Used: glaurung.internal.golden-gryphon.com
-# Update Count     : 0
-# Status           : Unknown, Use with caution!
-# HISTORY          : 
-# Description      : 
-# 
-# arch-tag: 9a70bb3a-30d4-4f4c-96e7-d3feb9a9752e
-#
+#!/bin/sh
 
-use Debconf::Client::ConfModule qw(:all);
-version('2.0');
-$|=1;
+set -eu
 
-# Predefined values:
-my $version           = "=V";
-my $link_in_boot      = "=IB";   # Should be empty, mostly
-my $no_symlink        = "=S";   # Should be empty, mostly
-my $reverse_symlink   = "=R";   # Should be empty, mostly
-my $do_symlink        = "Yes";  # target machine defined
-my $kimage            = "=K";   # Should be empty, mostly
-my $image_dir         = "=D";        # where the image is located
-my $relative_links    = "";          # target machine defined
-my $use_hard_links    = ''; # hardlinks do not work across fs boundaries
-my $minimal_swap      = '';          # Do not swap symlinks
-my $ignore_depmod_err = '';          # normally we do not
-my $relink_src_link   = 'YES'; # There is no harm in checking the link
-my $relink_build_link = 'YES'; # There is no harm in checking the link
-my $force_build_link  = '';    # There is no harm in checking the link
-my $arch              = "=A"; #  should be same as dpkg --print-installation-architecture
-my $kernel_arch       = "=B";
-my $package_name    = "=ST-image-$version";
-
-#known variables
-my $image_dest      = "/";
-my $realimageloc    = "/$image_dir/";
-my $have_conffile   = "";
-my $modules_base    = '/lib/modules';
-my $CONF_LOC        = '/etc/kernel-img.conf';
-
-# Ignore all invocations except when called on to configure.
-exit 0 unless $ARGV[0] =~ /configure/;
-chdir('/')           or die "could not chdir to /:$!\n";
-
-# remove multiple leading slashes; make sure there is at least one.
-$realimageloc  =~ s|^/*|/|o;
-$realimageloc  =~ s|/+|/|o;
-
-if (-r "$CONF_LOC" && -f "$CONF_LOC"  ) {
-  if (open(CONF, "$CONF_LOC")) {
-    while (<CONF>) {
-      chomp;
-      s/\#.*$//g;
-      next if /^\s*$/;
-
-      $do_symlink      = "" if /do_symlinks\s*=\s*(no|false|0)\s*$/ig;
-      $no_symlink      = "" if /no_symlinks\s*=\s*(no|false|0)\s*$/ig;
-      $reverse_symlink = "" if /reverse_symlink\s*=\s*(no|false|0)\s*$/ig;
-      $link_in_boot    = "" if /image_in_boot\s*=\s*(no|false|0)\s*$/ig;
-      $link_in_boot    = "" if /link_in_boot\s*=\s*(no|false|0)\s*$/ig;
-      $relative_links  = '' if /relative_links \s*=\s*(no|false|0)\s*$/ig;
-      $use_hard_links  = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/ig;
-      $minimal_swap    = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/ig;
-      $ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/ig;
-      $relink_src_link   = '' if /relink_src_link\s*=\s*(no|false|0)\s*$/ig;
-      $relink_build_link = '' if /relink_build_link\s*=\s*(no|false|0)\s*$/ig;
-      $force_build_link  = '' if /force_build_link\s*=\s*(no|false|0)\s*$/ig;
-
-      $do_symlink      = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/ig;
-      $no_symlink      = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/ig;
-      $reverse_symlink = "Yes" if /reverse_symlinks\s*=\s*(yes|true|1)\s*$/ig;
-      $link_in_boot    = "Yes" if /image_in_boot\s*=\s*(yes|true|1)\s*$/ig;
-      $link_in_boot    = "Yes" if /link_in_boot\s*=\s*(yes|true|1)\s*$/ig;
-      $relative_links  = "Yes" if /relative_links\s*=\s*(yes|true|1)\s*$/ig;
-      $use_hard_links  = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig;
-      $minimal_swap    = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/ig;
-      $ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/ig;
-      $relink_src_link   = 'Yes' if /relink_src_link\s*=\s*(yes|true|1)\s*$/ig;
-      $relink_build_link = 'Yes' if /relink_build_link\s*=\s*(yes|true|1)\s*$/ig;
-      $force_build_link = 'Yes' if /force_build_link\s*=\s*(yes|true|1)\s*$/ig;
-
-      $image_dest      = "$1"  if /image_dest\s*=\s*(\S+)/ig;
-    }
-    close CONF;
-    $have_conffile = "Yes";
-  }
-}
-
-if ($link_in_boot) {
-  $image_dest = "/$image_dir/";
-  $image_dest =~ s|^/*|/|o;
-}
-
-$image_dest = "$image_dest/";
-$image_dest =~ s|/+$|/|o;
-
-$ENV{KERNEL_ARCH}=$kernel_arch if $kernel_arch;
-
-# Paranoid check to make sure that the correct value is put in there
-if    (! $kimage)                 { $kimage = "vmlinuz"; } # Hmm. empty
-elsif ($kimage =~ m/^b?zImage$/o) { $kimage = "vmlinuz"; } # these produce vmlinuz
-elsif ($kimage =~ m/^[iI]mage$/o) { my $nop = $kimage;   }
-elsif ($kimage =~ m/^vmlinux$/o)  { my $nop = $kimage;   }
-else                              { $kimage = "vmlinuz"; } # Default
-
-if (! -e "$kimage" && ! $no_symlink && ! $reverse_symlink && 
-    ! $have_conffile ) {
-  my $ret;
-  my $seen;
-  my $question = "${package_name}/postinst/create-kimage-link-$version";
-
-  $ret = subst("$question", 'kimage', "$kimage");
-  die "Error setting debconf substitutions in $question: $seen" if $ret;
-
-  ($ret,$seen) = input('critical', "$question");
-  if ($ret && $ret != 30 ) {
-    die "Error setting debconf question $question: $seen";
-  }
-  if ($ret == 30) {
-  }
-  ($ret,$seen) = go ();
-  if ($ret && $ret != 30 ) {
-    die "Error asking debconf question $question: $seen";
-  }
-}
-
-exit 0;
-
-__END__
+exit 0



More information about the Kernel-svn-changes mailing list