HeSYINUvSBZfxqA-veewee 0.2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. data/.gitignore +15 -0
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +69 -0
  4. data/HeSYINUvSBZfxqA-veewee.gemspec +33 -0
  5. data/README.md +198 -0
  6. data/Rakefile +92 -0
  7. data/bin/veewee +79 -0
  8. data/lib/java/README.txt +5 -0
  9. data/lib/java/dir2floppy.jar +0 -0
  10. data/lib/java/dir2floppy.java +137 -0
  11. data/lib/vagrant_init.rb +6 -0
  12. data/lib/veewee/command.rb +82 -0
  13. data/lib/veewee/config.rb +5 -0
  14. data/lib/veewee/export.rb +81 -0
  15. data/lib/veewee/scancode.rb +151 -0
  16. data/lib/veewee/session.rb +783 -0
  17. data/lib/veewee/shell.rb +54 -0
  18. data/lib/veewee/ssh.rb +193 -0
  19. data/lib/veewee/transaction.rb +122 -0
  20. data/lib/veewee/utils.rb +26 -0
  21. data/lib/veewee/version.rb +3 -0
  22. data/lib/veewee/web.rb +48 -0
  23. data/lib/veewee.rb +2 -0
  24. data/templates/CentOS-4.8-i386/definition.rb +14 -0
  25. data/templates/CentOS-4.8-i386/ks.cfg +45 -0
  26. data/templates/CentOS-4.8-i386/postinstall.sh +55 -0
  27. data/templates/CentOS-5.6-i386/definition.rb +17 -0
  28. data/templates/CentOS-5.6-i386/ks.cfg +45 -0
  29. data/templates/CentOS-5.6-i386/postinstall.sh +50 -0
  30. data/templates/CentOS-5.6-i386-netboot/definition.rb +16 -0
  31. data/templates/CentOS-5.6-i386-netboot/ks.cfg +45 -0
  32. data/templates/CentOS-5.6-i386-netboot/postinstall.sh +52 -0
  33. data/templates/CentOS-5.6-x86_64-netboot/definition.rb +16 -0
  34. data/templates/CentOS-5.6-x86_64-netboot/ks.cfg +45 -0
  35. data/templates/CentOS-5.6-x86_64-netboot/postinstall.sh +60 -0
  36. data/templates/CentOS-6.0-i386/definition.rb +17 -0
  37. data/templates/CentOS-6.0-i386/ks.cfg +47 -0
  38. data/templates/CentOS-6.0-i386/postinstall.sh +48 -0
  39. data/templates/CentOS-6.0-i386-netboot/definition.rb +16 -0
  40. data/templates/CentOS-6.0-i386-netboot/ks.cfg +52 -0
  41. data/templates/CentOS-6.0-i386-netboot/postinstall.sh +30 -0
  42. data/templates/CentOS-6.0-x86_64/definition.rb +17 -0
  43. data/templates/CentOS-6.0-x86_64/ks.cfg +47 -0
  44. data/templates/CentOS-6.0-x86_64/postinstall.sh +48 -0
  45. data/templates/CentOS-6.0-x86_64-netboot/definition.rb +16 -0
  46. data/templates/CentOS-6.0-x86_64-netboot/ks.cfg +52 -0
  47. data/templates/CentOS-6.0-x86_64-netboot/postinstall.sh +30 -0
  48. data/templates/Debian-5.0.8-amd64-netboot/definition.rb +39 -0
  49. data/templates/Debian-5.0.8-amd64-netboot/postinstall.sh +60 -0
  50. data/templates/Debian-5.0.8-amd64-netboot/preseed.cfg +312 -0
  51. data/templates/Debian-5.0.8-i386-netboot/definition.rb +39 -0
  52. data/templates/Debian-5.0.8-i386-netboot/postinstall.sh +60 -0
  53. data/templates/Debian-5.0.8-i386-netboot/preseed.cfg +312 -0
  54. data/templates/Debian-6.0.2-amd64-netboot/definition.rb +39 -0
  55. data/templates/Debian-6.0.2-amd64-netboot/postinstall.sh +71 -0
  56. data/templates/Debian-6.0.2-amd64-netboot/preseed.cfg +312 -0
  57. data/templates/Debian-6.0.2-i386-netboot/definition.rb +41 -0
  58. data/templates/Debian-6.0.2-i386-netboot/postinstall.sh +83 -0
  59. data/templates/Debian-6.0.2-i386-netboot/preseed.cfg +312 -0
  60. data/templates/Fedora-14-amd64/definition.rb +16 -0
  61. data/templates/Fedora-14-amd64/ks.cfg +41 -0
  62. data/templates/Fedora-14-amd64/postinstall.sh +54 -0
  63. data/templates/Fedora-14-amd64-netboot/definition.rb +16 -0
  64. data/templates/Fedora-14-amd64-netboot/ks.cfg +40 -0
  65. data/templates/Fedora-14-amd64-netboot/postinstall.sh +54 -0
  66. data/templates/Fedora-14-i386/definition.rb +16 -0
  67. data/templates/Fedora-14-i386/ks.cfg +41 -0
  68. data/templates/Fedora-14-i386/postinstall.sh +54 -0
  69. data/templates/Fedora-14-i386-netboot/definition.rb +16 -0
  70. data/templates/Fedora-14-i386-netboot/ks.cfg +40 -0
  71. data/templates/Fedora-14-i386-netboot/postinstall.sh +54 -0
  72. data/templates/Fedora-15-i386/definition.rb +17 -0
  73. data/templates/Fedora-15-i386/ks.cfg +64 -0
  74. data/templates/Fedora-15-i386/postinstall.sh +33 -0
  75. data/templates/Fedora-15-i386-netboot/definition.rb +17 -0
  76. data/templates/Fedora-15-i386-netboot/ks.cfg +82 -0
  77. data/templates/Fedora-15-i386-netboot/postinstall.sh +18 -0
  78. data/templates/Sysrescuecd-2.0.0-experimental/autorun0 +3 -0
  79. data/templates/Sysrescuecd-2.0.0-experimental/definition.rb +20 -0
  80. data/templates/archlinux-i386/aif.cfg +33 -0
  81. data/templates/archlinux-i386/definition.rb +29 -0
  82. data/templates/archlinux-i386/postinstall.sh +95 -0
  83. data/templates/archlinux-x86_64/aif.cfg +33 -0
  84. data/templates/archlinux-x86_64/definition.rb +29 -0
  85. data/templates/archlinux-x86_64/postinstall.sh +95 -0
  86. data/templates/freebsd-8.2-experimental/definition.rb +19 -0
  87. data/templates/freebsd-8.2-experimental/postinstall.sh +191 -0
  88. data/templates/freebsd-8.2-pcbsd-i386/definition.rb +31 -0
  89. data/templates/freebsd-8.2-pcbsd-i386/pcinstall.fbg.cfg +57 -0
  90. data/templates/freebsd-8.2-pcbsd-i386/postinstall.sh +93 -0
  91. data/templates/freebsd-8.2-pcbsd-i386-netboot/definition.rb +34 -0
  92. data/templates/freebsd-8.2-pcbsd-i386-netboot/pcinstall.fbg.cfg +58 -0
  93. data/templates/freebsd-8.2-pcbsd-i386-netboot/postinstall.sh +93 -0
  94. data/templates/gentoo-latest-i386-experimental/definition.rb +29 -0
  95. data/templates/gentoo-latest-i386-experimental/postinstall.sh +184 -0
  96. data/templates/openindiana-148-ai-x86/auto_install/ai.dtd +58 -0
  97. data/templates/openindiana-148-ai-x86/auto_install/ai_manifest.xml +241 -0
  98. data/templates/openindiana-148-ai-x86/auto_install/configuration.dtd +44 -0
  99. data/templates/openindiana-148-ai-x86/auto_install/default.xml +121 -0
  100. data/templates/openindiana-148-ai-x86/auto_install/default.xml.orig +124 -0
  101. data/templates/openindiana-148-ai-x86/auto_install/sc_profiles/static_network.xml +105 -0
  102. data/templates/openindiana-148-ai-x86/auto_install/software.dtd +105 -0
  103. data/templates/openindiana-148-ai-x86/auto_install/target.dtd +196 -0
  104. data/templates/openindiana-148-ai-x86/default.xml +121 -0
  105. data/templates/openindiana-148-ai-x86/definition.rb +59 -0
  106. data/templates/openindiana-148-ai-x86/postinstall.sh +103 -0
  107. data/templates/opensuse-11.4-i386-experimental/README +11 -0
  108. data/templates/opensuse-11.4-i386-experimental/autoinst.xml +1269 -0
  109. data/templates/opensuse-11.4-i386-experimental/autoinst.xml.generated +1269 -0
  110. data/templates/opensuse-11.4-i386-experimental/autoinst.xml.tweaked +1269 -0
  111. data/templates/opensuse-11.4-i386-experimental/definition.rb +31 -0
  112. data/templates/opensuse-11.4-i386-experimental/postinstall.sh +90 -0
  113. data/templates/solaris-11-express-i386/auto_install/ai.dtd +58 -0
  114. data/templates/solaris-11-express-i386/auto_install/ai_manifest.xml +241 -0
  115. data/templates/solaris-11-express-i386/auto_install/configuration.dtd +44 -0
  116. data/templates/solaris-11-express-i386/auto_install/default.xml +124 -0
  117. data/templates/solaris-11-express-i386/auto_install/default.xml.orig +124 -0
  118. data/templates/solaris-11-express-i386/auto_install/sc_profiles/static_network.xml +105 -0
  119. data/templates/solaris-11-express-i386/auto_install/software.dtd +105 -0
  120. data/templates/solaris-11-express-i386/auto_install/target.dtd +196 -0
  121. data/templates/solaris-11-express-i386/default.xml +121 -0
  122. data/templates/solaris-11-express-i386/definition.rb +65 -0
  123. data/templates/solaris-11-express-i386/postinstall.sh +98 -0
  124. data/templates/ubuntu-10.04.2-amd64-netboot/definition.rb +23 -0
  125. data/templates/ubuntu-10.04.2-amd64-netboot/postinstall.sh +90 -0
  126. data/templates/ubuntu-10.04.2-amd64-netboot/preseed.cfg +89 -0
  127. data/templates/ubuntu-10.04.2-server-amd64/definition.rb +57 -0
  128. data/templates/ubuntu-10.04.2-server-amd64/postinstall.sh +90 -0
  129. data/templates/ubuntu-10.04.2-server-amd64/preseed.cfg +87 -0
  130. data/templates/ubuntu-10.04.2-server-amd64-alt/definition.rb +57 -0
  131. data/templates/ubuntu-10.04.2-server-amd64-alt/postinstall.sh +249 -0
  132. data/templates/ubuntu-10.04.2-server-amd64-alt/preseed.cfg +124 -0
  133. data/templates/ubuntu-10.04.2-server-i386/definition.rb +24 -0
  134. data/templates/ubuntu-10.04.2-server-i386/postinstall.sh +91 -0
  135. data/templates/ubuntu-10.04.2-server-i386/preseed.cfg +87 -0
  136. data/templates/ubuntu-10.04.2-server-i386-netboot/definition.rb +23 -0
  137. data/templates/ubuntu-10.04.2-server-i386-netboot/postinstall.sh +90 -0
  138. data/templates/ubuntu-10.04.2-server-i386-netboot/preseed.cfg +89 -0
  139. data/templates/ubuntu-10.10-server-amd64/definition.rb +24 -0
  140. data/templates/ubuntu-10.10-server-amd64/postinstall.sh +90 -0
  141. data/templates/ubuntu-10.10-server-amd64/preseed.cfg +87 -0
  142. data/templates/ubuntu-10.10-server-amd64-netboot/definition.rb +24 -0
  143. data/templates/ubuntu-10.10-server-amd64-netboot/postinstall.sh +90 -0
  144. data/templates/ubuntu-10.10-server-amd64-netboot/preseed.cfg +89 -0
  145. data/templates/ubuntu-10.10-server-i386/definition.rb +24 -0
  146. data/templates/ubuntu-10.10-server-i386/postinstall.sh +90 -0
  147. data/templates/ubuntu-10.10-server-i386/preseed.cfg +87 -0
  148. data/templates/ubuntu-10.10-server-i386-netboot/definition.rb +24 -0
  149. data/templates/ubuntu-10.10-server-i386-netboot/postinstall.sh +90 -0
  150. data/templates/ubuntu-10.10-server-i386-netboot/preseed.cfg +89 -0
  151. data/templates/ubuntu-11.04-server-amd64/definition.rb +24 -0
  152. data/templates/ubuntu-11.04-server-amd64/postinstall.sh +90 -0
  153. data/templates/ubuntu-11.04-server-amd64/preseed.cfg +87 -0
  154. data/templates/ubuntu-11.04-server-i386/definition.rb +24 -0
  155. data/templates/ubuntu-11.04-server-i386/postinstall.sh +90 -0
  156. data/templates/ubuntu-11.04-server-i386/preseed.cfg +87 -0
  157. data/templates/ubuntu-8.04.4-server-amd64/definition.rb +25 -0
  158. data/templates/ubuntu-8.04.4-server-amd64/postinstall.sh +68 -0
  159. data/templates/ubuntu-8.04.4-server-amd64/preseed.cfg +88 -0
  160. data/templates/ubuntu-8.04.4-server-i386/definition.rb +25 -0
  161. data/templates/ubuntu-8.04.4-server-i386/postinstall.sh +47 -0
  162. data/templates/ubuntu-8.04.4-server-i386/preseed.cfg +87 -0
  163. data/templates/windows-2008R2-amd64/Autounattend.xml +132 -0
  164. data/templates/windows-2008R2-amd64/README.md +68 -0
  165. data/templates/windows-2008R2-amd64/cygwin-setup.exe +0 -0
  166. data/templates/windows-2008R2-amd64/definition.rb +16 -0
  167. data/templates/windows-2008R2-amd64/install-cygwin-sshd.bat +38 -0
  168. data/templates/windows-2008R2-amd64/install-winrm.bat +6 -0
  169. data/templates/windows-2008R2-amd64/oracle-cert.cer +0 -0
  170. data/templates/windows-2008R2-amd64/postinstall.sh +122 -0
  171. data/templates/windows-2008R2-amd64/winrm.rb +8 -0
  172. data/trials/docu-vbox.txt +83 -0
  173. data/trials/f.rb +29 -0
  174. data/trials/t.rb +15 -0
  175. data/validation/features/steps/ssh_steps.rb +170 -0
  176. data/validation/support/env.rb +1 -0
  177. data/validation/vagrant-private.key +27 -0
  178. data/validation/vagrant.feature +52 -0
  179. data/validation/vagrant.pub +1 -0
  180. data/veewee.gemspec +33 -0
  181. data/vendor/cache/Platform-0.4.0.gem +0 -0
  182. data/vendor/cache/archive-tar-minitar-0.5.2.gem +0 -0
  183. data/vendor/cache/builder-3.0.0.gem +0 -0
  184. data/vendor/cache/cucumber-1.0.2.gem +0 -0
  185. data/vendor/cache/diff-lcs-1.1.2.gem +0 -0
  186. data/vendor/cache/erubis-2.7.0.gem +0 -0
  187. data/vendor/cache/ffi-1.0.9.gem +0 -0
  188. data/vendor/cache/gherkin-2.4.6.gem +0 -0
  189. data/vendor/cache/highline-1.6.2.gem +0 -0
  190. data/vendor/cache/i18n-0.5.0.gem +0 -0
  191. data/vendor/cache/json-1.5.3.gem +0 -0
  192. data/vendor/cache/net-scp-1.0.4.gem +0 -0
  193. data/vendor/cache/net-ssh-2.1.4.gem +0 -0
  194. data/vendor/cache/open4-1.1.0.gem +0 -0
  195. data/vendor/cache/popen4-0.1.2.gem +0 -0
  196. data/vendor/cache/progressbar-0.9.1.gem +0 -0
  197. data/vendor/cache/rspec-2.5.0.gem +0 -0
  198. data/vendor/cache/rspec-core-2.5.2.gem +0 -0
  199. data/vendor/cache/rspec-expectations-2.5.0.gem +0 -0
  200. data/vendor/cache/rspec-mocks-2.5.0.gem +0 -0
  201. data/vendor/cache/term-ansicolor-1.0.6.gem +0 -0
  202. data/vendor/cache/thor-0.14.6.gem +0 -0
  203. data/vendor/cache/vagrant-0.8.2.gem +0 -0
  204. data/vendor/cache/virtualbox-0.9.1.gem +0 -0
  205. metadata +417 -0
@@ -0,0 +1,184 @@
1
+ #!/bin/bash
2
+
3
+ date > /etc/vagrant_box_build_time
4
+
5
+ #Based on http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml
6
+
7
+ #Partition the disk
8
+ #This assumes a predefined layout - customize to your own liking
9
+
10
+ #/boot -> /dev/sda1
11
+ #swap -> /dev/sda2
12
+ #root -> /dev/sda3
13
+
14
+ sfdisk --force /dev/sda <<EOF
15
+ # partition table of /dev/sda
16
+ unit: sectors
17
+
18
+ /dev/sda1 : start= 2048, size= 409600, Id=83
19
+ /dev/sda2 : start= 411648, size= 2097152, Id=82
20
+ /dev/sda3 : start= 2508800, size= 18257920, Id=83
21
+ /dev/sda4 : start= 0, size= 0, Id= 0
22
+ EOF
23
+
24
+ sleep 2
25
+
26
+ #Format the /boot
27
+ mke2fs /dev/sda1
28
+
29
+ #Main partition /
30
+ mke2fs -j /dev/sda3
31
+
32
+ #Format the swap and use it
33
+ mkswap /dev/sda2
34
+ swapon /dev/sda2
35
+
36
+ #Mount the new disk
37
+ mkdir /mnt/gentoo
38
+ mount /dev/sda3 /mnt/gentoo
39
+ mkdir /mnt/gentoo/boot
40
+ mount /dev/sda1 /mnt/gentoo/boot
41
+ cd /mnt/gentoo
42
+
43
+ #Note: we retry as sometimes mirrors fail to have the files
44
+
45
+ #Download a stage3 archive
46
+ while true; do
47
+ wget ftp://distfiles.gentoo.org/gentoo/releases/x86/current-stage3/stage3-i686-*.tar.bz2 && > gotstage3
48
+ if [ -f "gotstage3" ]
49
+ then
50
+ break
51
+ else
52
+ echo "trying in 2seconds"
53
+ sleep 2
54
+ fi
55
+ done
56
+ tar xjpf stage3*
57
+
58
+ #Download Portage snapshot
59
+ cd /mnt/gentoo/usr
60
+ while true; do
61
+ wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2 && > gotportage
62
+ if [ -f "gotportage" ]
63
+ then
64
+ break
65
+ else
66
+ echo "trying in 2seconds"
67
+ sleep 2
68
+ fi
69
+ done
70
+
71
+ tar xjf portage-lat*
72
+
73
+ #Chroot
74
+ cd /
75
+ mount -t proc proc /mnt/gentoo/proc
76
+ mount --rbind /dev /mnt/gentoo/dev
77
+ cp -L /etc/resolv.conf /mnt/gentoo/etc/
78
+ echo "env-update && source /etc/profile" | chroot /mnt/gentoo /bin/bash -
79
+
80
+ # Get the kernel sources
81
+ echo "emerge gentoo-sources" | chroot /mnt/gentoo /bin/bash -
82
+
83
+ # We will use genkernel to automate the kernel compilation
84
+ # http://www.gentoo.org/doc/en/genkernel.xml
85
+ echo "emerge grub" | chroot /mnt/gentoo /bin/bash -
86
+ echo "emerge genkernel" | chroot /mnt/gentoo /bin/bash -
87
+ echo "genkernel --bootloader=grub --real_root=/dev/sda3 --no-splash --install all" | chroot /mnt/gentoo /bin/bash -
88
+
89
+ cat <<EOF | chroot /mnt/gentoo /bin/bash -
90
+ cat <<FSTAB > /etc/fstab
91
+ /dev/sda1 /boot ext2 noauto,noatime 1 2
92
+ /dev/sda3 / ext3 noatime 0 1
93
+ /dev/sda2 none swap sw 0 0
94
+ FSTAB
95
+ EOF
96
+
97
+
98
+ #We need some things to do here
99
+ #Network
100
+ cat <<EOF | chroot /mnt/gentoo /bin/bash -
101
+ cd /etc/conf.d
102
+ echo 'config_eth0=( "dhcp" )' >> net
103
+ #echo 'dhcpd_eth0=( "-t 10" )' >> net
104
+ #echo 'dhcp_eth0=( "release nodns nontp nois" )' >> net
105
+ rc-update add net.eth0 default
106
+ #Module?
107
+ rc-update add sshd default
108
+ EOF
109
+
110
+ #Root password
111
+
112
+ # Cron & Syslog
113
+ echo "emerge syslog-ng vixie-cron" | chroot /mnt/gentoo sh -
114
+ echo "rc-update add syslog-ng default" | chroot /mnt/gentoo sh -
115
+ echo "rc-update add vixie-cron default" | chroot /mnt/gentoo sh -
116
+
117
+ #Get an editor going
118
+ echo "emerge vim" | chroot /mnt/gentoo sh -
119
+
120
+ #Allow external ssh
121
+ echo "echo 'sshd:ALL' > /etc/hosts.allow" | chroot /mnt/gentoo sh -
122
+ echo "echo 'ALL:ALL' > /etc/hosts.deny" | chroot /mnt/gentoo sh -
123
+
124
+ #create vagrant user / password vagrant
125
+ chroot /mnt/gentoo useradd -m -r vagrant -p '$1$MPmczGP9$1SeNO4bw5YgiEJuo/ZkWq1'
126
+
127
+ #Configure Sudo
128
+ chroot /mnt/gentoo emerge sudo
129
+ echo "echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers" | chroot /mnt/gentoo sh -
130
+
131
+ #Installing vagrant keys
132
+ chroot /mnt/gentoo emerge wget
133
+
134
+ echo "creating vagrant ssh keys"
135
+ chroot /mnt/gentoo mkdir /home/vagrant/.ssh
136
+ chroot /mnt/gentoo chmod 700 /home/vagrant/.ssh
137
+ chroot /mnt/gentoo cd /home/vagrant/.ssh
138
+ chroot /mnt/gentoo wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
139
+ chroot /mnt/gentoo chmod 600 /home/vagrant/.ssh/authorized_keys
140
+ chroot /mnt/gentoo chown -R vagrant /home/vagrant/.ssh
141
+
142
+ #This could be done in postinstall
143
+ #reboot
144
+
145
+ #get some ruby running
146
+ chroot /mnt/gentoo emerge git curl gcc automake m4
147
+ chroot /mnt/gentoo emerge libiconv readline zlib openssl curl git libyaml sqlite libxslt
148
+ echo "bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)"| chroot /mnt/gentoo /bin/bash -
149
+ echo "/usr/local/rvm/bin/rvm install ruby-1.8.7 "| chroot /mnt/gentoo sh -
150
+ echo "/usr/local/rvm/bin/rvm use ruby-1.8.7 --default "| chroot /mnt/gentoo sh -
151
+
152
+ #Installing chef & Puppet
153
+ echo ". /usr/local/rvm/scripts/rvm ; gem install chef --no-ri --no-rdoc"| chroot /mnt/gentoo sh -
154
+ echo ". /usr/local/rvm/scripts/rvm ; gem install puppet --no-ri --no-rdoc"| chroot /mnt/gentoo sh -
155
+
156
+
157
+ echo "adding rvm to global bash rc"
158
+ echo "echo '. /usr/local/rvm/scripts/rvm' >> /etc/bash/bash.rc" | chroot /mnt/gentoo sh -
159
+
160
+ /bin/cp -f /root/.vbox_version /mnt/gentoo/home/vagrant/.vbox_version
161
+ VBOX_VERSION=$(cat /root/.vbox_version)
162
+
163
+ #Kernel headers
164
+ chroot /mnt/gentoo emerge linux-headers
165
+
166
+ #Installing the virtualbox guest additions
167
+ cat <<EOF | chroot /mnt/gentoo /bin/bash -
168
+ cd /tmp
169
+ mkdir /mnt/vbox
170
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
171
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt/vbox
172
+ sh /mnt/vbox/VBoxLinuxAdditions.run
173
+ #umount /mnt/vbox
174
+ #rm VBoxGuestAdditions_$VBOX_VERSION.iso
175
+ EOF
176
+
177
+ echo "sed -i 's:^DAEMONS\(.*\))$:DAEMONS\1 rc.vboxadd):' /etc/rc.conf" | chroot /mnt/gentoo sh -
178
+
179
+ exit
180
+ cd /
181
+ umount /mnt/gentoo/{proc,sys,dev}
182
+ umount /mnt/gentoo
183
+
184
+ reboot
@@ -0,0 +1,58 @@
1
+ <!--
2
+ CDDL HEADER START
3
+
4
+ The contents of this file are subject to the terms of the
5
+ Common Development and Distribution License (the "License").
6
+ You may not use this file except in compliance with the License.
7
+
8
+ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9
+ or http://www.opensolaris.org/os/licensing.
10
+ See the License for the specific language governing permissions
11
+ and limitations under the License.
12
+
13
+ When distributing Covered Code, include this CDDL HEADER in each
14
+ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15
+ If applicable, add the following below this CDDL HEADER, with the
16
+ fields enclosed by brackets "[]" replaced with your own identifying
17
+ information: Portions Copyright [yyyy] [name of copyright owner]
18
+
19
+ CDDL HEADER END
20
+
21
+ Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
22
+
23
+ -->
24
+
25
+ <!ELEMENT auto_install (ai_instance)>
26
+
27
+ <!ENTITY % target SYSTEM "target.dtd">
28
+ %target;
29
+
30
+ <!ENTITY % configuration SYSTEM "configuration.dtd">
31
+ %configuration;
32
+
33
+ <!ENTITY % software SYSTEM "software.dtd">
34
+ %software;
35
+
36
+ <!--
37
+ The source element, if specified, is for post installation changes
38
+ to the publisher for IPS. The first source element specified
39
+ will be considered the primary source, all additional sources
40
+ will be added as secondary sources.
41
+ -->
42
+
43
+ <!ELEMENT sc_manifest_file EMPTY>
44
+ <!ATTLIST sc_manifest_file name CDATA #REQUIRED>
45
+ <!ATTLIST sc_manifest_file URI CDATA #REQUIRED>
46
+
47
+ <!ELEMENT sc_embedded_manifest (#PCDATA)>
48
+ <!ATTLIST sc_embedded_manifest name CDATA #REQUIRED>
49
+
50
+ <!ELEMENT ai_instance (target*, software+, add_drivers?, (configuration*|sc_manifest_file|sc_embedded_manifest), source*)>
51
+ <!ATTLIST ai_instance name CDATA #REQUIRED>
52
+ <!ATTLIST ai_instance http_proxy CDATA #IMPLIED>
53
+ <!ATTLIST ai_instance auto_reboot (true|false) "false">
54
+
55
+ <!ELEMENT add_drivers (software*, search_all?)>
56
+
57
+ <!ELEMENT search_all (source?)>
58
+ <!ATTLIST search_all addall (true|false) "false">
@@ -0,0 +1,241 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ CDDL HEADER START
4
+
5
+ The contents of this file are subject to the terms of the
6
+ Common Development and Distribution License (the "License").
7
+ You may not use this file except in compliance with the License.
8
+
9
+ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10
+ or http://www.opensolaris.org/os/licensing.
11
+ See the License for the specific language governing permissions
12
+ and limitations under the License.
13
+
14
+ When distributing Covered Code, include this CDDL HEADER in each
15
+ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16
+ If applicable, add the following below this CDDL HEADER, with the
17
+ fields enclosed by brackets "[]" replaced with your own identifying
18
+ information: Portions Copyright [yyyy] [name of copyright owner]
19
+
20
+ CDDL HEADER END
21
+
22
+ Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
23
+ -->
24
+ <!--
25
+ ===============================================================================
26
+ DTD sample manifest for Automatic Installer input manifest specification.
27
+ ===============================================================================
28
+ -->
29
+ <!DOCTYPE auto_install SYSTEM "file:///usr/share/auto_install/ai.dtd">
30
+ <auto_install>
31
+ <!--
32
+ "auto_reboot" set to "true" may be an issue for x86 machines.
33
+ The boot order is not guaranteed and may cause unexpected
34
+ behavior. If auto_reboot is not desired, removing this
35
+ attribute, e.g. <ai_instance name="sample_ai_manfiest">
36
+ will work. "auto_reboot" is set to false by default.
37
+ -->
38
+ <ai_instance name="sample_ai_manifest" auto_reboot="true">
39
+ <!--
40
+ =======================================================================
41
+ <target/target_device> - selections for AI target Device specification
42
+
43
+ Disk criteria are divided into three mutually exclusive groups:
44
+
45
+ G1 - deterministic disk criteria
46
+ ................................
47
+ * target_device/disk/iscsi parameters
48
+ * target_device/disk/disk_name, with name_type attribute:
49
+ one of ctd, volid, devpath or devid
50
+
51
+ G2 - non-deterministic disk criteria
52
+ ..........................
53
+ * target_device/disk/disk_prop: Any of dev_type, dev_vendor or
54
+ dev_size
55
+
56
+ G3 - keyword disk criteria
57
+ ...........................
58
+ * target_device/disk/disk_keyword: "boot_disk"
59
+
60
+ Schema ai.dtd enforces following policy:
61
+
62
+ * criteria in group G1 are mutually exclusive - only
63
+ one can be specified at a time
64
+
65
+ * groups G1, G2 and G3 are mutually exclusive - i.e.
66
+ if criteria from G1 is specified, no criteria
67
+ from G2 or G3 are allowed and vice versa
68
+
69
+ * multiple criteria from G2 can be specified
70
+ =======================================================================
71
+ -->
72
+ <target>
73
+ <target_device>
74
+ <disk>
75
+ <!-- G1 -->
76
+ <!--
77
+ c#t#d# device name like c0t0d0 or
78
+ MPXIO name like c0t2000002037CD9F72d0
79
+ -->
80
+ <disk_name name="c1t0d0" name_type="ctd"/>
81
+ <!-- volume name set for instance by means
82
+ of format(1M) command
83
+ -->
84
+ <!--
85
+ <disk_name name="ai-disk" name_type="volid"/>
86
+ -->
87
+ <!-- device id - e.g. can be obtained by means of
88
+ iostat(1M) -iEn
89
+ -->
90
+ <!--
91
+ <disk_name name="id1,cmdk@AST31000340NS=____________9QJ2LNYY" name_type="devid"/>
92
+ -->
93
+ <!-- device path under /devices directory, e.g.
94
+ /pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@0,0
95
+ -->
96
+ <!--
97
+ <disk_name name="/pci@0/pci@9/pci@0/scsi@1/sd@0,0" name_type="devpath"/>
98
+ -->
99
+ <!--
100
+ ISCSI target device
101
+
102
+ <iscsi name="c0d2E0001010F68">
103
+ <ip>192.168.1.34</ip>
104
+ </iscsi>
105
+ -->
106
+ <!-- G2 -->
107
+ <!--
108
+ <disk_prop dev_vendor="hitachi" dev_size="20480mb"/>
109
+ -->
110
+ <!-- G3 -->
111
+ <!--
112
+ <disk_keyword key="boot_disk"/>
113
+ -->
114
+ <!--
115
+ Uncomment this to force AI to find an existing Solaris
116
+ partition instead of creating a new one.
117
+ -->
118
+ <!--
119
+ <partition action="use_existing"/>
120
+ -->
121
+ <partition name="1" part_type="99">
122
+ <size start_sector="200" val="20480mb"/>
123
+ </partition>
124
+ <partition name="4" part_type="99">
125
+ <size start_sector="2000" val="20480mb"/>
126
+ </partition>
127
+ <slice name="0" is_root="true">
128
+ <size val="20480mb"/>
129
+ </slice>
130
+ <slice name="4">
131
+ <size val="20480mb"/>
132
+ </slice>
133
+ </disk>
134
+ </target_device>
135
+ </target>
136
+ <software name="ips">
137
+ <source>
138
+ <publisher name="openindiana.org">
139
+ <origin name="http://pkg.openindiana.org/dev"/>
140
+ </publisher>
141
+ </source>
142
+ <!--
143
+ By default the latest build available, in the
144
+ specified IPS repository, is installed.
145
+ if another build is required, the build number has
146
+ to be appended to the 'entire' package in following
147
+ form:
148
+ <name="entire@0.5.11-0.build#"/>
149
+ -->
150
+ <software_data type="IPS">
151
+ <name>pkg:/entire</name>
152
+ <name>pkg:/babel_install</name>
153
+ </software_data>
154
+ <!--
155
+ babel_install and slim_install are group packages used to
156
+ define the default installation. They are removed here so
157
+ that they do not inhibit removal of other packages on the installed
158
+ system
159
+ -->
160
+ <software_data action="uninstall" type="IPS">
161
+ <name>pkg:/babel_install</name>
162
+ <name>pkg:/slim_install</name>
163
+ </software_data>
164
+ </software>
165
+ <add_drivers>
166
+ <!--
167
+ Driver Updates: This section is for adding driver packages to the
168
+ boot environment before the installation takes place. The
169
+ installer can then access all devices on the system. The
170
+ packages installed in the boot environment will also be installed
171
+ on the target.
172
+
173
+ A <search_all> entry performs a search for devices which are
174
+ missing their drivers. A repository publisher and location
175
+ may be specified, and that repository and its database will
176
+ be used. If no publisher and location is specified, the
177
+ configured repositories will be used.
178
+ (See pkg publisher command.) If <addall> is specified as
179
+ "true", then drivers the database says are third-party drivers
180
+ will be added like all others; otherwise third-party drivers
181
+ will not be added.
182
+
183
+ <search_all addall="true">
184
+ <source>
185
+ <publisher name="solaris">
186
+ <origin name="http://pkg.oracle.com/solaris/release"/>
187
+ </publisher>
188
+ </source>
189
+ </search_all>
190
+
191
+ <software> entries are user-provided specifications of packages
192
+ needed in order to perform the install. types are P5I, SVR4, DU.
193
+ A <software_data> action of "noinstall" inhibits adding to target.
194
+
195
+ P5I: A pkg(5) P5I file, full path is in the source/publisher/origin.
196
+ Path may be to a local file or an http or ftp specification.
197
+ <software>
198
+ <source>
199
+ <publisher>
200
+ <origin
201
+ name=
202
+ "http://pkg.oracle.com/solaris/release/p5i/0/driver/firewire.p5i"/>
203
+ </publisher>
204
+ </source>
205
+ <software_data type="P5I"/>
206
+ </software>
207
+
208
+ SVR4: An SVR4 package spec. The source/publisher/origin corresponds
209
+ to the directory containing the packages. The
210
+ software/software_data/name refers tp the package's top level
211
+ directory or the package's datastream file.
212
+
213
+ <software>
214
+ <source>
215
+ <publisher>
216
+ <origin name="/export/package_dir"/>
217
+ </publisher>
218
+ </source>
219
+ <software_data type="SVR4">
220
+ <name>my_disk_driver.d</name>
221
+ </software_data>
222
+ </software>
223
+
224
+ DU: An ITU (Install Time Update) or Driver Update image.
225
+ The source/publisher/origin refers to the path just above the
226
+ image's DU directory (if expanded) or the name of the .iso image.
227
+ All packages in the image will be added.
228
+
229
+ <software>
230
+ <source>
231
+ <publisher>
232
+ <origin name="/export/duimages/mydriver.iso"/>
233
+ </publisher>
234
+ </source>
235
+ <software_data type="DU"/>
236
+ </software>
237
+ -->
238
+ <search_all/>
239
+ </add_drivers>
240
+ </ai_instance>
241
+ </auto_install>
@@ -0,0 +1,44 @@
1
+ <!--
2
+ CDDL HEADER START
3
+
4
+ The contents of this file are subject to the terms of the
5
+ Common Development and Distribution License (the "License").
6
+ You may not use this file except in compliance with the License.
7
+
8
+ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9
+ or http://www.opensolaris.org/os/licensing.
10
+ See the License for the specific language governing permissions
11
+ and limitations under the License.
12
+
13
+ When distributing Covered Code, include this CDDL HEADER in each
14
+ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15
+ If applicable, add the following below this CDDL HEADER, with the
16
+ fields enclosed by brackets "[]" replaced with your own identifying
17
+ information: Portions Copyright [yyyy] [name of copyright owner]
18
+
19
+ CDDL HEADER END
20
+
21
+ Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
22
+
23
+ -->
24
+
25
+ <!ELEMENT configuration (validation?)>
26
+ <!ATTLIST configuration source CDATA #REQUIRED>
27
+ <!ATTLIST configuration dest CDATA #IMPLIED>
28
+
29
+ <!--
30
+ Default to user configuration if type is not set.
31
+ -->
32
+ <!ATTLIST configuration type (network|sysconf|user) #IMPLIED>
33
+
34
+ <!--
35
+ Configuration name should match the name of the checkpoint consuming
36
+ the configuration data.
37
+ -->
38
+ <!ATTLIST configuration name CDATA #REQUIRED>
39
+
40
+ <!ELEMENT validation EMPTY>
41
+ <!ATTLIST validation path CDATA #IMPLIED>
42
+ <!ATTLIST validation args CDATA #IMPLIED>
43
+ <!ATTLIST validation on_error CDATA "stop">
44
+
@@ -0,0 +1,121 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ CDDL HEADER START
4
+
5
+ The contents of this file are subject to the terms of the
6
+ Common Development and Distribution License (the "License").
7
+ You may not use this file except in compliance with the License.
8
+
9
+ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10
+ or http://www.opensolaris.org/os/licensing.
11
+ See the License for the specific language governing permissions
12
+ and limitations under the License.
13
+
14
+ When distributing Covered Code, include this CDDL HEADER in each
15
+ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16
+ If applicable, add the following below this CDDL HEADER, with the
17
+ fields enclosed by brackets "[]" replaced with your own identifying
18
+ information: Portions Copyright [yyyy] [name of copyright owner]
19
+
20
+ CDDL HEADER END
21
+
22
+ Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
23
+
24
+ -->
25
+ <!DOCTYPE auto_install SYSTEM "file:///usr/share/auto_install/ai.dtd">
26
+ <auto_install>
27
+ <ai_instance name="default">
28
+ <software>
29
+ <source>
30
+ <publisher name="openindiana.org">
31
+ <origin name="http://pkg.openindiana.org/dev"/>
32
+ </publisher>
33
+ </source>
34
+ <!--
35
+ By default the latest build available, in the specified IPS
36
+ repository, is installed. If another build is required, the
37
+ build number has to be appended to the 'entire' package in following
38
+ form:
39
+
40
+ <name>pkg:/entire@0.5.11-0.build#</name>
41
+ -->
42
+ <software_data action="install" type="IPS">
43
+ <name>pkg:/server_install</name>
44
+ <!--
45
+ The following packages are required by iSCSI and included
46
+ by default to make it easier for users to enable iSCSI if
47
+ desired. They can be deleted from this list if iSCSI isn't
48
+ used. See iscsiadm(1m) man page for more information.
49
+ support for iSCSI.
50
+ -->
51
+ </software_data>
52
+ <!--
53
+ babel_install and slim_install are group packages used to
54
+ define the default installation. They are removed here so
55
+ that they do not inhibit removal of other packages on the
56
+ installed system.
57
+ -->
58
+ <software_data action="uninstall" type="IPS">
59
+ <name>pkg:/server_install</name>
60
+ </software_data>
61
+
62
+ </software>
63
+ <!--
64
+ Add missing driver packages to a booted install image so an
65
+ installation can complete. Add packages to target as well.
66
+ <search_all> searches and installs from configured repo.
67
+ -->
68
+ <add_drivers>
69
+ <search_all/>
70
+ </add_drivers>
71
+ <sc_embedded_manifest name="AI">
72
+ <!-- <?xml version='1.0'?>
73
+ <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
74
+ <service_bundle type="profile" name="system configuration">
75
+ <service name="system/install/config" version="1" type="service">
76
+ <instance name="default" enabled="true">
77
+ <property_group name="user_account" type="application">
78
+ <propval name="login" type="astring" value="vagrant"/>
79
+ <propval name="password" type="astring" value="$1$MPmczGP9$1SeNO4bw5YgiEJuo/ZkWq1"/>
80
+ <propval name="description" type="astring" value="default_user"/>
81
+ <propval name="shell" type="astring" value="/usr/bin/bash"/>
82
+ <propval name="uid" type='count' value='101'/>
83
+ <propval name="gid" type='count' value='10'/>
84
+ <propval name="type" type="astring" value="normal"/>
85
+ <propval name="roles" type="astring" value="root"/>
86
+ </property_group>
87
+
88
+ <property_group name="root_account" type="application">
89
+ <propval name="password" type="astring" value="$1$MPmczGP9$1SeNO4bw5YgiEJuo/ZkWq1"/>
90
+ <propval name="type" type="astring" value="role"/>
91
+ </property_group>
92
+
93
+ <property_group name="other_sc_params" type="application">
94
+ <propval name="timezone" type="astring" value="GMT"/>
95
+ <propval name="hostname" type="astring" value="solaris"/>
96
+ </property_group>
97
+ </instance>
98
+ </service>
99
+ <service name="system/console-login" version="1" type="service">
100
+ <property_group name="ttymon" type="application">
101
+ <propval name="terminal_type" type="astring" value="sun"/>
102
+ </property_group>
103
+ </service>
104
+
105
+ <service name='system/keymap' version='1' type='service'>
106
+ <instance name='default' enabled='true'>
107
+ <property_group name='keymap' type='system'>
108
+ <propval name='layout' type='astring' value='US-English'/>
109
+ </property_group>
110
+ </instance>
111
+ </service>
112
+
113
+ <service name="network/physical" version="1" type="service">
114
+ <instance name="nwam" enabled="true"/>
115
+ <instance name="default" enabled="false"/>
116
+ </service>
117
+ </service_bundle>
118
+ -->
119
+ </sc_embedded_manifest>
120
+ </ai_instance>
121
+ </auto_install>