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,19 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1', :memory_size=> '256',
3
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
4
+ :os_type_id => 'FreeBSD_64',
5
+ :iso_file => "mfsbsd-8.2-amd64.iso",
6
+ :iso_src => "http://mfsbsd.vx.sk/iso/mfsbsd-8.2-amd64.iso",
7
+ :iso_md5 => "3296cf0e5844",
8
+ :iso_download_timeout => "1000",
9
+ :boot_wait => "10", :boot_cmd_sequence => [
10
+ '<Enter>'
11
+ ],
12
+ :kickstart_port => "7122", :kickstart_timeout => "10000", :kickstart_file => "",
13
+ :ssh_login_timeout => "10000", :ssh_user => "root", :ssh_password => "mfsroot", :ssh_key => "",
14
+ :ssh_host_port => "7222", :ssh_guest_port => "22",
15
+ :sudo_cmd => "sh '%f'",
16
+ :shutdown_cmd => "shutdown -H",
17
+ :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => "10000"
18
+ })
19
+ #'setkmap=us dodhcp=eth0 dhcphostname=%NAME% ar_source=http://%IP%:%PORT%/ autoruns=0 rootpass=vagrant',
@@ -0,0 +1,191 @@
1
+ date > /etc/vagrant_box_build_time
2
+
3
+ #http://www.freebsd.org/doc/en_US.ISO8859-1/articles/remote-install/installation.html
4
+ dd if=/dev/zero of=/dev/ad4 count=2
5
+ #bsdlabel -w -B /dev/ad4
6
+
7
+ sysctl kern.geom.debugflags=16
8
+
9
+ #http://forum.nginx.org/read.php?23,146311,146451
10
+ # Init the disk with an MBR
11
+ gpart create -s mbr ad4
12
+ # Create a BSD container
13
+ gpart add -t freebsd ad4
14
+ # Init with a BSD scheme
15
+ gpart create -s bsd ad4s1
16
+
17
+ # 1GB for /
18
+ gpart add -t freebsd-ufs -s 1G ad4s1
19
+
20
+ gpart add -t freebsd-swap -s 2G ad4s1
21
+ # 2GB for swap
22
+ gpart add -t freebsd-ufs -s 2G ad4s1
23
+ # 2GB for /var
24
+ gpart add -t freebsd-ufs ad4s1
25
+ # all rest for /usr
26
+
27
+ #install bootcode
28
+ gpart bootcode -p /boot/boot -i 1 ad4s1
29
+ gpart set -a active -i ad4
30
+
31
+ cat <<EOF >/install.cfg
32
+ # This is the installation configuration file for our rackmounted FreeBSD
33
+ # cluster machines
34
+
35
+ # Turn on extra debugging.
36
+ debug=yes
37
+
38
+ #releaseName 8.0-RELEASE
39
+
40
+
41
+ ################################
42
+ # My host specific data
43
+ #hostname=dragonfly
44
+ #domainname=cs.duke.edu
45
+ #nameserver=152.3.145.240
46
+ #defaultrouter=152.3.145.240
47
+ #ipaddr=152.3.145.64
48
+ #netmask=255.255.255.0
49
+ ################################
50
+ tryDHCP=NO
51
+
52
+ ################################
53
+ # Which installation device to use
54
+ # ftp://ftp.smr.ru/pub/0/FreeBSD/current/src/release/sysinstall/sysinstall.h
55
+ _ftpPath=ftp://ftp2.freebsd.org/pub/FreeBSD/
56
+ #_httpPath=ftp://ftp2.freebsd.org/pub/FreeBSD/
57
+ #httpProxy=192.168.2.10:800
58
+ netDev=em0
59
+ mediaSetFTP
60
+ #mediaSetHTTP
61
+
62
+ ################################
63
+
64
+ ################################
65
+ # Select which distributions we want.
66
+ #dists= bin doc games manpages catpages proflibs dict info des compat1x compat20 compat21 X331bin X331cfg X331doc X331html X331lib X331lkit X331man X331prog X331ps X331set X331VG16 X331nest X331vfb X331fnts X331f100 X331fcyr X331fscl X331fnon sinclude
67
+ #distSetCustom
68
+ distSetMinimum
69
+ ################################
70
+
71
+ ################################
72
+ # Now set the parameters for the partition editor on ad4.
73
+ disk=ad4
74
+ partition=all
75
+ #http://www.mail-archive.com/freebsd-questions@freebsd.org/msg212036.html
76
+ bootManager=standard
77
+ diskPartitionEditor
78
+ #diskPartitionWrite
79
+
80
+ ################################
81
+
82
+ ################################
83
+ # All sizes are expressed in 512 byte blocks!
84
+ #
85
+ # A 960MB root partition, followed by a 0.5G swap partition, followed by
86
+ # a 1G /var, and a /usr using all the remaining space on the disk
87
+ #
88
+ ad4s1-1=ufs 1966080 /mnt
89
+ ad4s1-2=swap 1048576 none
90
+ ad4s1-3=ufs 2097152 /mnt/var
91
+ ad4s1-4=ufs 0 /mnt/usr
92
+ # Let's do it!
93
+
94
+
95
+ diskLabelEditor
96
+ diskLabelCommit
97
+
98
+ #http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2010-11/msg00420.html
99
+ installRoot=/mnt
100
+ #
101
+
102
+ # OK, everything is set. Do it!
103
+ installCommit
104
+
105
+
106
+ # Install some packages at the end.
107
+ # package=LPRng-3.2.3
108
+ # packageAdd
109
+
110
+
111
+ # Install some packages at the end.
112
+
113
+ #
114
+ # this last package is special. It is used to configure the machine.
115
+ # it installs several files (like /root/.rhosts) an its installation
116
+ # script tweaks several options in /etc/rc.conf
117
+ #
118
+ #package=ari-0.0
119
+ #packageAdd
120
+
121
+ EOF
122
+
123
+ sysinstall configFile=/install.cfg loadConfig
124
+
125
+
126
+ #http://www.daemonforums.org/showthread.php?t=4389
127
+
128
+ cd /mnt/boot
129
+ cp -Rp GENERIC/* kernel/
130
+
131
+ #For some reason this is the disk layout the sysinstall creates
132
+
133
+ cat <<EOF > /mnt/etc/fstab
134
+ /dev/ad4s1b none swap sw 0 0
135
+ /dev/ad4s1d / ufs rw 0 0
136
+ /dev/ad4s1f /usr ufs rw 0 0
137
+ /dev/ad4s1e /var ufs rw 0 0
138
+ EOF
139
+
140
+
141
+ # boot0cfg -B ad4
142
+ #make the menu appear
143
+
144
+ # Booting mentions an error
145
+ # Invalid partition
146
+ # FAILS WITH: 0:ad(0,a)/boot/kernel/kernel
147
+ # WORKS WITH: 0:ad(4,d)/boot/loader
148
+
149
+ #http://www.mail-archive.com/freebsd-questions@freebsd.org/msg72530.html
150
+ cat <<EOF > /mnt/boot/loader.conf
151
+ #geom_label_load="YES"
152
+ #root_disk_unit="4"
153
+ #currdev="disk4s1d"
154
+ #rootdev="disk4s1d"
155
+ #vfs.root.mountfrom="ufs:/dev/ad4s1d"
156
+ EOF
157
+
158
+ #activate dhcp
159
+ cat <<EOF > /mnt/etc/rc.conf
160
+ ifconfig_DEFAULT="DHCP"
161
+ EOF
162
+
163
+
164
+ #The vi edit program needs a /var/tmp/vi.recover file.
165
+
166
+ mkdir -p /mnt/usr/local/etc/rc.d/
167
+ cd /mnt/usr/local/etc/rc.d/
168
+ cat <<EOF > mkvirecover
169
+ #!/bin/sh
170
+ # PROVIDE: mkvirecover
171
+ # REQUIRE: mountcritremote
172
+ # BEFORE: DAEMON virecover
173
+
174
+
175
+ . /etc/rc.subr
176
+
177
+ name="mkvirecover"
178
+ stop_cmd=":"
179
+ start_cmd="mkvirecover_start"
180
+
181
+ mkvirecover_start()
182
+ {
183
+ [ -d /var/tmp/vi.recover ] || mkdir -m 1777 /var/tmp/vi.recover
184
+ echo '.'
185
+ }
186
+
187
+ load_rc_config "\$name"
188
+ run_rc_command "\$1"
189
+ EOF
190
+
191
+ chmod 555 /mnt/usr/local/etc/rc.d/mkvirecover
@@ -0,0 +1,31 @@
1
+ # Many thanks to @draco2002
2
+ # http://dracosplace.com/veewee_and_freebsd
3
+
4
+ # :iso_src => "ftp://mirrors.isc.org/pub/pcbsd/8.2/i386/PCBSD8.2-x86-bootonly.iso",
5
+ # :iso_file => "PCBSD8.2-x86-bootonly.iso",
6
+
7
+ Veewee::Session.declare({
8
+ :cpu_count => '1', :memory_size=> '768',
9
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
10
+ :os_type_id => 'FreeBSD',
11
+ :iso_file => "PCBSD8.2-x86-DVD.iso",
12
+ :iso_src => "ftp://mirrors.isc.org/pub/pcbsd/8.2/i386/PCBSD8.2-x86-DVD.iso",
13
+ :iso_md5 => "6433a8abf6073b177750d48398bed341",
14
+ :iso_download_timeout => "1000",
15
+ :boot_wait => "70", :boot_cmd_sequence => [
16
+ '<KillX>',
17
+ '<Enter>',
18
+ 'dhclient em0<Enter>',
19
+ 'sleep 15;echo "Lets Get the File";fetch "http://%IP%:%PORT%/pcinstall.fbg.cfg";sleep 2;',
20
+ 'echo \'echo sshd_enable=\"YES\" >> $FSMNT/etc/rc.conf\' > /root/activate-ssh.sh ; cat /root/activate-ssh.sh<Enter>',
21
+ 'chmod +x /root/activate-ssh.sh<Enter>',
22
+ 'echo "Hope i got the file";/usr/PCBSD/pc-sysinstall/pc-sysinstall -c /root/pcinstall.fbg.cfg<Enter>',
23
+ 'reboot<Enter>'
24
+ ],
25
+ :kickstart_port => "7122", :kickstart_timeout => "10000", :kickstart_file => "pcinstall.fbg.cfg",
26
+ :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
27
+ :ssh_host_port => "7222", :ssh_guest_port => "22",
28
+ :sudo_cmd => "cat '%f'|su -",
29
+ :shutdown_cmd => "shutdown -p now",
30
+ :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => "10000"
31
+ })
@@ -0,0 +1,57 @@
1
+ installInteractive=no
2
+ installMode=fresh
3
+ installType=FreeBSD
4
+ packageType=tar
5
+ hostname=freebsd
6
+ #installMedium=dvd
7
+ installMedium=dvd
8
+ netSaveDev=AUTO-DHCP
9
+
10
+ # Timezone
11
+ timeZone=America/New_York
12
+ enableNTP=yes
13
+
14
+ # Keyboard Layout Options
15
+ localizeKeyModel=pc104
16
+ localizeKeyLayout=us U.S.
17
+
18
+ # Disk Setup for ada0
19
+ disk0=ada0
20
+ partition=ALL
21
+ bootManager=none
22
+ partscheme=MBR
23
+ commitDiskPart
24
+
25
+ # Setup the disk label
26
+ # All sizes are expressed in MB
27
+ disk0-part=UFS+S 1024 /
28
+ disk0-part=SWAP 1534 none
29
+ disk0-part=UFS+S 2048 /var
30
+ disk0-part=UFS+S 5529 /usr
31
+ commitDiskLabel
32
+
33
+ # List our components to install
34
+ # Src is only needed for the virtualbox extensions
35
+ # installComponents=ports,src
36
+ installComponents=ports
37
+
38
+ # Set the root pass
39
+ rootPass=vagrant
40
+
41
+ userName=vagrant
42
+ userComment=vagrant user
43
+ userPass=vagrant
44
+ userShell=/bin/csh
45
+ userHome=/home/vagrant
46
+ # Wheel group makes user sudo able
47
+ userGroups=wheel,operator
48
+ commitUser
49
+
50
+ runExtCommand=/root/activate-ssh.sh
51
+
52
+ # We temporary disable password checks , we promise to make up for it later
53
+ runCommand=sed -i -e 's@auth.*include.*system@@' /etc/pam.d/su
54
+
55
+ # making the clock run correctly
56
+ # http://forums.virtualbox.org/viewtopic.php?f=11&t=12210&start=0
57
+ # runCommand=echo 'kern.hz=100' > /boot/loader.conf
@@ -0,0 +1,93 @@
1
+ date > /etc/vagrant_box_build_time
2
+
3
+ # Get the latest portstree (needed for virtualbox to be on 4.x)
4
+ portsnap fetch update
5
+
6
+ #First install sudo
7
+ cd /usr/ports/security/sudo
8
+ make install -DBATCH
9
+
10
+ #We prefer bash to be there
11
+ cd /usr/ports/shells/bash
12
+ make install -DBATCH
13
+
14
+
15
+ #Off to rubygems to get first ruby running
16
+ cd /usr/ports/devel/ruby-gems
17
+ make install -DBATCH
18
+
19
+ #Gem chef - does install chef 9.12 (latest in ports?)
20
+ cd /usr/ports/sysutils/rubygem-chef
21
+ make install -DBATCH
22
+
23
+ #Installing chef & Puppet
24
+ /usr/local/bin/gem update chef --no-ri --no-rdoc
25
+ /usr/local/bin/gem install puppet --no-ri --no-rdoc
26
+
27
+ #Get wget
28
+ cd /usr/ports/ftp/wget
29
+ make install -DBATCH
30
+
31
+ #Installing vagrant keys
32
+ mkdir /home/vagrant/.ssh
33
+ chmod 700 /home/vagrant/.ssh
34
+ cd /home/vagrant/.ssh
35
+ /usr/local/bin/wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
36
+ chown -R vagrant /home/vagrant/.ssh
37
+
38
+ # Cleaning portstree to save space
39
+ # http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html
40
+ cd /usr/ports/ports-mgmt/portupgrade
41
+ make install -DBATCH clean
42
+
43
+ /usr/local/sbin/portsclean -C
44
+
45
+ # As sharedfolders are not in defaults ports tree
46
+ # We will use vagrant via NFS
47
+ # Enable NFS
48
+ echo 'rpcbind_enable="YES"' >> /etc/rc.conf
49
+ echo 'nfs_server_enable="YES"' >> /etc/rc.conf
50
+ echo 'mountd_flags="-r"' >> /etc/rc.conf
51
+
52
+ # Enable passwordless sudo
53
+ echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /usr/local/etc/sudoers
54
+ # Restore correct su permissions
55
+ # I'll leave that up to the reader :)
56
+
57
+ echo "=============================================================================="
58
+ echo "NOTE: FreeBSD - Vagrant"
59
+ echo "When using this basebox you need to do some special stuff in your Vagrantfile"
60
+ echo "1) Include the correct system"
61
+ echo " require 'vagrant/systems/freebsd' "
62
+ echo "2) Add after your config.vm.box = ..."
63
+ echo " config.vm.system = :freebsd"
64
+ echo "3) Enable HostOnly network"
65
+ echo " config.vm.network ...."
66
+ echo "4) Use nfs instead of shared folders"
67
+ echo " :nfs => true"
68
+ echo "============================================================================="
69
+
70
+
71
+
72
+ exit
73
+
74
+ # The iso from virtualbox will only install windows/solaris or linux, no BSD
75
+ # Research is on it's way to have 4.x in the main portstree
76
+ # http://www.listware.net/201102/freebsd-ports/65201-call-for-testers-virtualbox-404.html
77
+ # Virtualbox additions - http://wiki.freebsd.org/VirtualBox
78
+ # Currently this will only work for 4.0.4
79
+ cd /tmp
80
+ wget http://home.bluelife.at/ports/virtualbox-cft-20110218.tar.gz
81
+ cd /usr/ports
82
+ tar -xzvf /tmp/virtualbox-cft-20110218.tar.gz
83
+
84
+ # This requires libtool >= 2.4
85
+ cd /usr/ports/devel/libtool
86
+ make clean
87
+ make install -DBATCH
88
+
89
+ cd /usr/ports/emulators/virtualbox-ose-additions
90
+ make install -DBATCH
91
+
92
+ echo 'vboxguest_enable="YES"' >> /etc/rc.conf
93
+ echo 'vboxservice_enable="YES"' >> /etc/rc.conf
@@ -0,0 +1,34 @@
1
+ # Many thanks to @draco2002
2
+ # http://dracosplace.com/veewee_and_freebsd
3
+
4
+ # :iso_src => "ftp://mirrors.isc.org/pub/pcbsd/8.2/i386/PCBSD8.2-x86-bootonly.iso",
5
+ # :iso_file => "PCBSD8.2-x86-bootonly.iso",
6
+
7
+ #Based on https://gist.github.com/911058
8
+
9
+ Veewee::Session.declare( {
10
+ :cpu_count => '1', :memory_size=> '768',
11
+ :disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
12
+ :os_type_id => 'FreeBSD',
13
+ :iso_file => "PCBSD8.2-x86-bootonly.iso",
14
+ :iso_src => "http://mirrors.isc.org/pub/pcbsd/8.2/i386/PCBSD8.2-x86-bootonly.iso",
15
+ :iso_md5 => "548646b9d1042a162f769bc280149417",
16
+ :iso_download_timeout => "1000",
17
+ :boot_wait => "70",:boot_cmd_sequence => [
18
+ '<KillX>',
19
+ '<Enter>',
20
+ 'dhclient em0<Enter>',
21
+ 'sleep 15;echo "Lets Get the File";fetch "http://%IP%:%PORT%/pcinstall.fbg.cfg";sleep 2;',
22
+ 'echo \'echo sshd_enable=\"YES\" >> $FSMNT/etc/rc.conf\' > /root/activate-ssh.sh ; cat /root/activate-ssh.sh<Enter>',
23
+ 'chmod +x /root/activate-ssh.sh<Enter>',
24
+ 'echo "Hope i got the file";/usr/PCBSD/pc-sysinstall/pc-sysinstall -c /root/pcinstall.fbg.cfg<Enter>',
25
+ 'reboot<Enter>'
26
+ ],
27
+ :kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "pcinstall.fbg.cfg",
28
+ :ssh_login_timeout => "10000",:ssh_user => "vagrant", :ssh_password => "vagrant",:ssh_key => "",
29
+ :ssh_host_port => "7222", :ssh_guest_port => "22",
30
+ :sudo_cmd => "cat '%f'|su -",
31
+ :shutdown_cmd => "shutdown -p now",
32
+ :postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000"
33
+ }
34
+ )
@@ -0,0 +1,58 @@
1
+ installInteractive=no
2
+ installMode=fresh
3
+ installType=FreeBSD
4
+ packageType=tar
5
+ hostname=freebsd
6
+ #installMedium=dvd
7
+ ftpPath=ftp://ftp.pcbsd.org/pub/mirror/8.2/i386/netinstall/
8
+ installMedium=ftp
9
+ netSaveDev=AUTO-DHCP
10
+
11
+ # Timezone
12
+ timeZone=America/New_York
13
+ enableNTP=yes
14
+
15
+ # Keyboard Layout Options
16
+ localizeKeyModel=pc104
17
+ localizeKeyLayout=us U.S.
18
+
19
+ # Disk Setup for ada0
20
+ disk0=ada0
21
+ partition=ALL
22
+ bootManager=none
23
+ partscheme=MBR
24
+ commitDiskPart
25
+
26
+ # Setup the disk label
27
+ # All sizes are expressed in MB
28
+ disk0-part=UFS+S 1024 /
29
+ disk0-part=SWAP 1534 none
30
+ disk0-part=UFS+S 2048 /var
31
+ disk0-part=UFS+S 5529 /usr
32
+ commitDiskLabel
33
+
34
+ # List our components to install
35
+ # Src is only needed for the virtualbox extensions
36
+ # installComponents=ports,src
37
+ installComponents=ports
38
+
39
+ # Set the root pass
40
+ rootPass=vagrant
41
+
42
+ userName=vagrant
43
+ userComment=vagrant user
44
+ userPass=vagrant
45
+ userShell=/bin/csh
46
+ userHome=/home/vagrant
47
+ # Wheel group makes user sudo able
48
+ userGroups=wheel,operator
49
+ commitUser
50
+
51
+ runExtCommand=/root/activate-ssh.sh
52
+
53
+ # We temporary disable password checks , we promise to make up for it later
54
+ runCommand=sed -i -e 's@auth.*include.*system@@' /etc/pam.d/su
55
+
56
+ # making the clock run correctly
57
+ # http://forums.virtualbox.org/viewtopic.php?f=11&t=12210&start=0
58
+ # runCommand=echo 'kern.hz=100' > /boot/loader.conf
@@ -0,0 +1,93 @@
1
+ date > /etc/vagrant_box_build_time
2
+
3
+ # Get the latest portstree (needed for virtualbox to be on 4.x)
4
+ portsnap fetch update
5
+
6
+ #First install sudo
7
+ cd /usr/ports/security/sudo
8
+ make install -DBATCH
9
+
10
+ #We prefer bash to be there
11
+ cd /usr/ports/shells/bash
12
+ make install -DBATCH
13
+
14
+
15
+ #Off to rubygems to get first ruby running
16
+ cd /usr/ports/devel/ruby-gems
17
+ make install -DBATCH
18
+
19
+ #Gem chef - does install chef 9.12 (latest in ports?)
20
+ cd /usr/ports/sysutils/rubygem-chef
21
+ make install -DBATCH
22
+
23
+ #Installing chef & Puppet
24
+ /usr/local/bin/gem update chef --no-ri --no-rdoc
25
+ /usr/local/bin/gem install puppet --no-ri --no-rdoc
26
+
27
+ #Get wget
28
+ cd /usr/ports/ftp/wget
29
+ make install -DBATCH
30
+
31
+ #Installing vagrant keys
32
+ mkdir /home/vagrant/.ssh
33
+ chmod 700 /home/vagrant/.ssh
34
+ cd /home/vagrant/.ssh
35
+ /usr/local/bin/wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
36
+ chown -R vagrant /home/vagrant/.ssh
37
+
38
+ # Cleaning portstree to save space
39
+ # http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html
40
+ cd /usr/ports/ports-mgmt/portupgrade
41
+ make install -DBATCH clean
42
+
43
+ /usr/local/sbin/portsclean -C
44
+
45
+ # As sharedfolders are not in defaults ports tree
46
+ # We will use vagrant via NFS
47
+ # Enable NFS
48
+ echo 'rpcbind_enable="YES"' >> /etc/rc.conf
49
+ echo 'nfs_server_enable="YES"' >> /etc/rc.conf
50
+ echo 'mountd_flags="-r"' >> /etc/rc.conf
51
+
52
+ # Enable passwordless sudo
53
+ echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /usr/local/etc/sudoers
54
+ # Restore correct su permissions
55
+ # I'll leave that up to the reader :)
56
+
57
+ echo "=============================================================================="
58
+ echo "NOTE: FreeBSD - Vagrant"
59
+ echo "When using this basebox you need to do some special stuff in your Vagrantfile"
60
+ echo "1) Include the correct system"
61
+ echo " require 'vagrant/systems/freebsd' "
62
+ echo "2) Add after your config.vm.box = ..."
63
+ echo " config.vm.system = :freebsd"
64
+ echo "3) Enable HostOnly network"
65
+ echo " config.vm.network ...."
66
+ echo "4) Use nfs instead of shared folders"
67
+ echo " :nfs => true"
68
+ echo "============================================================================="
69
+
70
+
71
+
72
+ exit
73
+
74
+ # The iso from virtualbox will only install windows/solaris or linux, no BSD
75
+ # Research is on it's way to have 4.x in the main portstree
76
+ # http://www.listware.net/201102/freebsd-ports/65201-call-for-testers-virtualbox-404.html
77
+ # Virtualbox additions - http://wiki.freebsd.org/VirtualBox
78
+ # Currently this will only work for 4.0.4
79
+ cd /tmp
80
+ wget http://home.bluelife.at/ports/virtualbox-cft-20110218.tar.gz
81
+ cd /usr/ports
82
+ tar -xzvf /tmp/virtualbox-cft-20110218.tar.gz
83
+
84
+ # This requires libtool >= 2.4
85
+ cd /usr/ports/devel/libtool
86
+ make clean
87
+ make install -DBATCH
88
+
89
+ cd /usr/ports/emulators/virtualbox-ose-additions
90
+ make install -DBATCH
91
+
92
+ echo 'vboxguest_enable="YES"' >> /etc/rc.conf
93
+ echo 'vboxservice_enable="YES"' >> /etc/rc.conf
@@ -0,0 +1,29 @@
1
+ Veewee::Session.declare( {
2
+ :cpu_count => '1', :memory_size=> '768',
3
+ :disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
4
+ :os_type_id => 'Gentoo',
5
+ :iso_file => "install-x86-minimal-20110426.iso",
6
+ :iso_src => "http://distfiles.gentoo.org/releases/x86/autobuilds/current-iso/install-x86-minimal-20110426.iso",
7
+ :iso_md5 => "548646b9d1042a162f769bc280149417",
8
+ :iso_download_timeout => "1000",
9
+ :boot_wait => "120",:boot_cmd_sequence => [
10
+ 'net-setup eth0<Enter>',
11
+ '<Wait><Enter>',
12
+ '2<Enter>',
13
+ '1<Enter>',
14
+ '<Wait><Wait>ifconfig -a <Enter>',
15
+ #'sleep 5 ;curl http://%IP%:%PORT%/stages.sh -o stages.sh &&',
16
+ #'bash stages.sh &<Enter>',
17
+ 'passwd<Enter><Wait><Wait>',
18
+ 'vagrant<Enter><Wait>',
19
+ 'vagrant<Enter><Wait>',
20
+ '/etc/init.d/sshd start<Enter>'
21
+ ],
22
+ :kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "",
23
+ :ssh_login_timeout => "10000",:ssh_user => "root", :ssh_password => "vagrant",:ssh_key => "",
24
+ :ssh_host_port => "7222", :ssh_guest_port => "22",
25
+ :sudo_cmd => "cat '%f'|su -",
26
+ :shutdown_cmd => "shutdown -p now",
27
+ :postinstall_files => [ "post_install.sh"],:postinstall_timeout => "10000"
28
+ }
29
+ )