diff --git a/yard/scripts/make_debian b/yard/scripts/make_debian new file mode 100755 index 0000000..a44f7bd --- /dev/null +++ b/yard/scripts/make_debian @@ -0,0 +1,71 @@ +#!/usr/bin/perl + +# You will need to get swim at http://www.sourceforge.net/projects/avd +my $home = "$ENV{HOME}/.gbootroot"; +my $home_yard = "$home/yard"; +my $template_dir = "$home_yard/templates/"; +my $home_yard_replacements = "$home_yard/Replacements"; + +# And tests will be ran here for file-rc and swim +# Options: to include or remove docs /usr/share/{doc,man,info} + +system "swim --search \"Priority: required\" > /dev/null 2>&1"; +my $swim_packages = "swim -qS|"; +my $swim_list = "swim -qSl|"; +my $file_rc = "swim -ql file-rc|"; + +open(SWIM,$swim_packages) or die "Couldn't open $?\n"; +my @required_packages = ; chomp @required_packages; +close(SWIM); + +open(SWIM,$swim_list) or die "Couldn't open $?\n"; +my @required_files = ; chomp @required_files; +close(SWIM); + +open(SWIM,$file_rc) or die "Couldn't open $?\n"; +my @extra_files = ; chomp @extra_files; +close(SWIM); + +push(@required_files,@extra_files); + +# This creates a tweaked runlevel.conf which is easier then trying to figure +# out which symlinks to use in /etc/rc?d. + + +open(DEBIAN,">$template_dir/Debian-test.yard") + or die "Couldn't open $?\n"; + +print DEBIAN stuff(); + + +foreach (@required_files) { + if (-e && !-d) { + print DEBIAN "$_\n"; + } + +} +close(DEBIAN); + +sub stuff { +$stuff = << "STUFF"; +# This template creates a complete Debian system which is more streamlined 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. make-debain +# 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 this +# template. + +# The STUFF NEEDED in order for init to work. +/etc/inittab <= Replacements/etc/inittab.debian +/etc/default/rcS + + +# The information needed so that dpkg can work. + + +## ALL the REQUIRED files generated by make-debian +STUFF + +return $stuff; +} # end sub stuff +