This file is indexed.

/usr/share/doc/mgetty/examples/coverpg-pl.ps is in mgetty-docs 1.1.36-3.1.

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

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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#!/usr/bin/perl
#
#From: mathews@ednet.gsfc.nasa.gov (Jason Mathews)
#Message-Id: <199706022135.RAA23777@ednet.gsfc.nasa.gov>
#Subject: MGETTY+SENDFAX's make.coverpg converted to perl - FYI
#To: gert@greenie.muc.de
#Date: Mon, 2 Jun 1997 17:35:43 -0400 (EDT)
#
#Hi Gert Doering,
#
#I've been playing with your fax package mgetty-1.1.6 and find
#it useful.
#
#The following program is a direct conversion of your
#shell/awk script to perl for better performance
#and easier maint. IMHO so if you want it just take it. 
#
#Sincerely,
#
#jason
#
#-------------------------------------------------------------------------

#!/usr/local/bin/perl 
# 
# make.coverpg -- slightly advanced version, use ghostscript 
#                 (just a sample, naturally you have to adapt all the texts!) 
# 
# Author: gert@greenie.muc.de 
#
# Converted to perl by Jason Mathews <mathews@nssdc.gsfc.nasa.gov> 6/2/97
# - Keeps postscript in memory opposed to writing a temp file
# 
# Syntax: 
#       make.coverpg [-m memo string] <pages>  <sender-ID>   <sender-NAME>
#                    <receiver-ID> <receiver-NAME> <date> <time> 
 
# 
# if called with "-m <memo-file>", put that file on cover page: 
if ($ARGV[0] eq "-m") { 
    shift;
    $MEMO = shift;
}

#
# get arguments
#
$PAGES=shift;
$S_ID=shift;
$S_NAME=shift;
$R_ID=shift;
$R_NAME=shift;
$DATE=shift;
$TIME=shift;

#
# chose proper driver for resolution

$driver = $ENV{'normal_res'} ?  "dfaxlow" : "dfaxhigh";

$out = <<'EOF';
%! PS-Adobe-1.0
%%Title: Sendfax Fax Header Page

%
% simple logo, "top right" corner is at x/y=570/750
%
1 5 100
{
   dup 100 div setgray
   dup 10 div 1 add setlinewidth
   dup 5 mul 570 exch sub	% x = 10*i + 50
   750 moveto			% y = 100
   dup 5 mul 750 exch sub
   570 exch lineto	% x, y as above but swapped
   pop
   stroke
} for

%
% change encoding to ISO8859-1 (important for my German umlauts) [Fritz Elfert]
%
/ISOfindfont {
    dup 100 string cvs (ISO-) exch concatstrings cvn exch
    findfont dup maxlength dict begin
        { 1 index /FID ne {def}{pop pop} ifelse } forall
        /Encoding ISOLatin1Encoding def
        currentdict
    end definefont
} def

%
% page title
%
/Times-BoldItalic findfont 37 scalefont setfont
0 setgray
100 600 moveto
(BOL Fax) dup 
    gsave true charpath 1 setgray 1 setlinewidth stroke grestore
    show
EOF

# now the page layout differs, depending on the use of "MEMO" or not

if ($MEMO eq '') {
    $out .= <<EOF;
%
% data
%
/Times-Roman ISOfindfont 19 scalefont setfont
100 500 moveto (Sender:  ) show
currentpoint ($S_ID) show
-20 add moveto ($S_NAME) show

100 420 moveto (Fax Number:  ) show
currentpoint ($R_ID) show
-20 add moveto ($R_NAME) show

100 340 moveto (Date:  $TIME  $DATE) show

100 280 moveto (Pages \(inc. Fax Cover\):  $PAGES) show

showpage
EOF

# end "no memo"

} else {

# start "with memo"

$out .= <<EOF;
%
% data (squeezed somewhat)
%
/Times-Roman ISOfindfont 19 scalefont setfont
100 550 moveto (Sender:  ) show
currentpoint ($S_ID) show
-20 add moveto ($S_NAME) show

100 500 moveto (Fax Number:  ) show
currentpoint ($R_ID) show
-20 add moveto ($R_NAME) show

100 450 moveto (Date:  $TIME  $DATE) show

100 420 moveto (Pages \(inc. Cover Page\):  $PAGES) show

50 380 moveto (Kurznachricht:) show

EOF

  $x=50; $y=350;
  open(FILE, $MEMO);
  while (<FILE>) {
      chop;
      s/\(/\\\(/g;
      s/\)/\\\)/g;
      $out .= "$x $y moveto ($_) show\n";
      $y -= 15;
      last if $y < 0;
  }
  close(FILE);
  $out .= "showpage\n";
}

$| = 1; # unbuffer output

open(PIPE, "|-") || exec "gs", "-sDEVICE=$driver", "-sOutputFile=-",
    "-dSAFER", "-dNOPAUSE","-q", "-";
print PIPE $out;
close(PIPE);

#
# end make.coverpg
#

#---------------------------------------------------------------------------
#Jason Mathews, Code 633.2       |National Space Science Data Center
#NASA/Goddard Space Flight Center|email: mathews@nssdc.gsfc.nasa.gov
#Greenbelt, MD 20771-0001  USA   |http://coney.gsfc.nasa.gov/Mathews/jason.html
#--------------------------------+