|
@ -96,11 +96,12 @@ my $stuff = << "STUFF"; |
|
|
|
|
|
|
|
|
# This template creates a complete Debian system which is more streamlined |
|
|
# This template creates a complete Debian system which is more streamlined |
|
|
# than the base.tgz used for normal installations. Once everything is made, |
|
|
# than the base.tgz used for normal installations. Once everything is made, |
|
|
# you can use user-mode-linux to tweak the system, as well as apt. |
|
|
# you can use user-mode-linux and apt to tweak the system. |
|
|
# Make-debian generates all the information you need, you will need swim and |
|
|
# Make-debian generates all the information you need. You will need swim and |
|
|
# file-rc installed, and you will have to be running a Debian system to make |
|
|
# file-rc installed, and you will have to be running a Debian system to make |
|
|
# this template. Make-debian ditches info, man, and doc files by default, |
|
|
# this template. Make_debian ditches info, man, and doc files by default |
|
|
# use the "doc" option to make documentation. |
|
|
# and timezone info not found on the host system, but gives you the choice |
|
|
|
|
|
# to decide otherwise. |
|
|
|
|
|
|
|
|
# Characteristics: user: root passwd: root |
|
|
# Characteristics: user: root passwd: root |
|
|
# user: user passwd: user |
|
|
# user: user passwd: user |
|
@ -168,6 +169,9 @@ my $stuff = << "STUFF"; |
|
|
/var/lib/apt/lists/partial |
|
|
/var/lib/apt/lists/partial |
|
|
/etc/apt/* |
|
|
/etc/apt/* |
|
|
|
|
|
|
|
|
|
|
|
# Timezone data from libc6 |
|
|
|
|
|
/usr/share/zoneinfo/localtime |
|
|
|
|
|
|
|
|
# Debconf stuff |
|
|
# Debconf stuff |
|
|
/var/cache/debconf |
|
|
/var/cache/debconf |
|
|
|
|
|
|
|
@ -249,6 +253,34 @@ return $stuff; |
|
|
####################### |
|
|
####################### |
|
|
## Template Creation ## |
|
|
## Template Creation ## |
|
|
####################### |
|
|
####################### |
|
|
|
|
|
|
|
|
|
|
|
# Ask some questions first. |
|
|
|
|
|
my $doc_reply = "nothing"; |
|
|
|
|
|
print "The default is to remove /usr/share/{doc,man,info}? [yes or no]: "; |
|
|
|
|
|
while (<STDIN>) { |
|
|
|
|
|
$doc_reply = $_; |
|
|
|
|
|
last if $doc_reply eq "yes\n"; |
|
|
|
|
|
last if $doc_reply eq "no\n"; |
|
|
|
|
|
if ($doc_reply eq "\n") { $doc_reply = "yes\n"; last; } |
|
|
|
|
|
if ($doc_reply ne "yes\n" || $doc_reply ne "no\n") { |
|
|
|
|
|
print "The default is to remove /usr/share/{doc,man,info}? [yes or no]: "; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
print "\nThe default is to remove everything in /usr/share/zoneinfo\n" . |
|
|
|
|
|
"except for your local settings found in /etc/locatime? [yes or no]: "; |
|
|
|
|
|
my $localtime_reply = "nothing"; |
|
|
|
|
|
while (<STDIN>) { |
|
|
|
|
|
$localtime_reply = $_; |
|
|
|
|
|
last if $localtime_reply eq "yes\n"; |
|
|
|
|
|
last if $localtime_reply eq "no\n"; |
|
|
|
|
|
if ($localtime_reply eq "\n") { $localtime_reply = "yes\n"; last; } |
|
|
|
|
|
if ($localtime_reply ne "yes\n" || $localtime_reply ne "no\n") { |
|
|
|
|
|
print "The default is to remove everything in /usr/share/zoneinfo\n" . |
|
|
|
|
|
"except for your local settings found in /etc/locatime? [yes or no]: "; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
open(DEBIAN,">$template_dir/$debian_yard") |
|
|
open(DEBIAN,">$template_dir/$debian_yard") |
|
|
or die "Couldn't open $!\n"; |
|
|
or die "Couldn't open $!\n"; |
|
|
open(FILERC,"/etc/runlevel.conf") or die "No runlevel.conf: $!\n"; |
|
|
open(FILERC,"/etc/runlevel.conf") or die "No runlevel.conf: $!\n"; |
|
@ -262,15 +294,20 @@ alternatives(); |
|
|
inetd_in(); |
|
|
inetd_in(); |
|
|
foreach (@required_files) { |
|
|
foreach (@required_files) { |
|
|
if (-e && !-d) { |
|
|
if (-e && !-d) { |
|
|
if ($ARGV[0] && $ARGV[0] eq "doc") { |
|
|
if ($doc_reply eq "no\n") { |
|
|
if ($alternatives{$_}) { |
|
|
if ($alternatives{$_}) { |
|
|
push(@alternatives,$_); |
|
|
push(@alternatives,$_); |
|
|
} |
|
|
} |
|
|
if ($inetd{$_}) { |
|
|
if ($inetd{$_}) { |
|
|
$inetd{$_} = 1; |
|
|
$inetd{$_} = 1; |
|
|
} |
|
|
} |
|
|
|
|
|
if ($localtime_reply eq "yes\n") { |
|
|
|
|
|
print DEBIAN "$_\n" if ! m,/usr/share/zoneinfo,; |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
print DEBIAN "$_\n"; |
|
|
print DEBIAN "$_\n"; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
else { |
|
|
else { |
|
|
if (! m,/usr/share/info|/usr/share/man|/usr/share/doc,) { |
|
|
if (! m,/usr/share/info|/usr/share/man|/usr/share/doc,) { |
|
|
if ($alternatives{$_}) { |
|
|
if ($alternatives{$_}) { |
|
@ -279,9 +316,14 @@ foreach (@required_files) { |
|
|
if ($inetd{$_}) { |
|
|
if ($inetd{$_}) { |
|
|
$inetd{$_} = 1; |
|
|
$inetd{$_} = 1; |
|
|
} |
|
|
} |
|
|
|
|
|
if ($localtime_reply eq "yes\n") { |
|
|
|
|
|
print DEBIAN "$_\n" if ! m,/usr/share/zoneinfo,; |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
print DEBIAN "$_\n"; |
|
|
print DEBIAN "$_\n"; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
if (m,/etc/init\.d,) { |
|
|
if (m,/etc/init\.d,) { |
|
|
foreach my $filerc (@filerc) { |
|
|
foreach my $filerc (@filerc) { |
|
|
push(@file_rc,$filerc) if $filerc =~ /$_/; |
|
|
push(@file_rc,$filerc) if $filerc =~ /$_/; |
|
|