Skip to content

Commit

Permalink
apt-install added
Browse files Browse the repository at this point in the history
  • Loading branch information
ebolwidt committed Mar 7, 2011
1 parent c37cb1e commit 2bda680
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions lib/debootstrap/debootstrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,12 @@ def apt_dist_upgrade
root_path, @apt_get_path, "dist-upgrade", "-y")
puts(output)
end

def apt_install(packages)
packages.each do |package|
output = KernelExt::fork_exec_get_output(create_chroot_env, @chroot_path,
root_path, @apt_get_path, "install", "-y", package)
puts(output)
end
end
end
6 changes: 4 additions & 2 deletions sandbox/hlpartitiontable_use.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
pt = PartitionTable.new
pt.type = "mbr"

proot = Partition.new(500000, Partition::Type_Linux_Data, "/", "ext2")
pboot = Partition.new(80000, Partition::Type_Linux_Data, "/boot", "ext2")
proot = Partition.new(1000000, Partition::Type_Linux_Data, "/", "ext2")
pboot = Partition.new(100000, Partition::Type_Linux_Data, "/boot", "ext2")
pt.partitions.push(proot, pboot)

# Add some more partitions to test MBR extended boot records
Expand Down Expand Up @@ -44,6 +44,8 @@
bootstrap.apt_update
bootstrap.apt_dist_upgrade

bootstrap.apt_install(["linux-headers-generic", "linux-restricted-modules-generic", "linux-restricted-modules-generic", "linux-image-generic" ])

exit 0

bootstrap.unbind
Expand Down

0 comments on commit 2bda680

Please sign in to comment.