This file is indexed.

/usr/share/kernel-package/pkg/image/config is in kernel-package 13.018.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#! /usr/bin/perl
#                              -*- Mode: Cperl -*-
# config ---
# Author           : Manoj Srivastava ( srivasta@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
#

use Debconf::Client::ConfModule qw(:all);
version('2.0');
$| = 1;

# Predefined values:
my $version           = "=V";
my $move_image        = '';     # target machine defined
my $kimage            = "=K";   # Should be empty, mostly
my $image_dir         = "=D";   # where the image is located
my $clobber_modules   = '';     # target machine defined
my $initrd            = "=I";   # initrd kernel
my $postinst_hook     = '';     #Normally we do not
my $postrm_hook       = '';     #Normally we do not
my $preinst_hook      = '';     #Normally we do not
my $prerm_hook        = '';     #Normally we do not
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-architecture
my $kernel_arch       = "=B";
my $package_name = "=ST-image-$version";

#known variables
my $image_dest     = "/";
my $realimageloc   = "/$image_dir/";
my $have_conffile  = "";
my $silent_modules = '';
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*$/;

      $move_image        = "" if /move_image\s*=\s*(no|false|0)\s*$/ig;
      $clobber_modules   = '' if /clobber_modules\s*=\s*(no|false|0)\s*$/ig;
      $silent_modules    = '' if /silent_modules\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;

      $move_image      = "Yes" if /move_image\s*=\s*(yes|true|1)\s*$/ig;
      $clobber_modules = "Yes" if /clobber_modules\s*=\s*(yes|true|1)\s*$/ig;
      $silent_modules  = 'Yes' if /silent_modules\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;
      $postinst_hook = "$1" if /postinst_hook\s*=\s*(\S+)/ig;
      $postrm_hook   = "$1" if /postrm_hook\s*=\s*(\S+)/ig;
      $preinst_hook  = "$1" if /preinst_hook\s*=\s*(\S+)/ig;
      $prerm_hook    = "$1" if /prerm_hook\s*=\s*(\S+)/ig;
      $mkimage       = "$1" if /mkimage\s*=\s*(.+)$/ig;
      $ramdisk       = "$1" if /ramdisk\s*=\s*(.+)$/ig;
    } ## end while (<CONF>)
    close CONF;
    $have_conffile = "Yes";
  } ## end if ( open( CONF, "$CONF_LOC"...))
} ## end if ( -r "$CONF_LOC" &&...)

# For some versions of kernel-package, we had this warning in the
# postinst, but the rules did not really interpolate the value in.
# Here is a sanity check.
my $pattern = "=" . "I";
$initrd =~ s/^$pattern$//;

$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; }
elsif ( $kimage =~ m/^xen[0u]-linux$/o ) {
  $package_name = "${kimage}-$version";
}
elsif ( $kimage =~ m/^uImage$/msxo ) { my $nop = $kimage; }
else                                 { $kimage = "vmlinuz"; }    # Default

if ( -d "$kimage" ) {
  my $ret;
  my $seen;
  my $note = "${package_name}/postinst/kimage-is-a-directory";

  ( $ret, $seen ) = fset( "$note", 'seen', 'false' );
  die "Error setting debconf flags in $note: $seen" if $ret;

  $ret = subst( "$note", 'kimage', "$kimage" );
  die "Error setting debconf substitutions in $note: $seen" if $ret;

  $ret = subst( "$note", 'image_dest', "$image_dest" );
  die "Error setting debconf substitutions in $note: $seen" if $ret;

  ( $ret, $seen ) = input( 'critical', "$note" );
  if ( $ret && $ret != 30 ) {
    die "Error setting debconf note $note: $seen";
  }

  ( $ret, $seen ) = go();
  if ( $ret && $ret != 30 ) {
    die "Error asking debconf question $note: $seen";
  }
} ## end if ( -d "$kimage" )

# We used to have System.* files in /
if ( -e "/System.map" || -e "/System.old" ) {
  my $ret;
  my $seen;
  my $question = "${package_name}/postinst/old-dir-initrd-link-$version";

  ( $ret, $seen ) = input( 'medium', "$question" );
  if ( $ret && $ret != 30 ) {
    die "Error setting debconf question $question: $seen";
  }

  ( $ret, $seen ) = go();
  if ( $ret && $ret != 30 ) {
    die "Error asking debconf question $question: $seen";
  }
} ## end if ( -e "/System.map" ...)

exit 0;

__END__