This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // curl -k https://localhost:8000/ | |
| var https = require('https'); | |
| var fs = require('fs'); | |
| var options = { | |
| key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), | |
| cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') | |
| }; | |
| https.createServer(options, function (req, res) { |
So, to get something like /etc/rc.local you can use the custom SMF import facility. (See the source
for more information about how this actually works.)
/opt is mounted out of zones/opt by default. You can create a directory /opt/custom/smf and populate it with SMF manifests. Any manifests you put in there will be imported by SmartOS when it boots. Below is an example SMF manifest that simply starts /opt/custom/bin/postboot, a self-explanatory shell script that you can use like /etc/rc.local.
Note that it would likely be better to customise and respin your own images, as putting a bunch of platform state in the zones pool undoes some of the benefits of the ramdisk platform architecture that SmartOS has.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From bmc Mon Oct 2 15:12:34 2000 | |
| Subject: Undergrad systems curriculum | |
| To: faculty@cs.cornell.edu | |
| Date: Mon, 2 Oct 2000 15:12:34 -0700 (PDT) | |
| X-Mailer: ELM [version 2.4ME+ PL31H (25)] | |
| MIME-Version: 1.0 | |
| Content-Type: text/plain; charset=US-ASCII | |
| Content-Transfer-Encoding: 7bit | |
| Content-Length: 4065 | |
| Status: RO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/bash | |
| # Moves a SmartOS VM to a different host | |
| # This script stops the VM, sends it to the target host, | |
| # imports it on the target host, and starts it on the | |
| # target host. It is your responsibility to remove it on | |
| # the origin host after confirming the script worked as | |
| # expected. | |
| # | |
| # Usage: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "Good hardware costs money, and your time has value. The ditches on either | |
| side of the road through the land of hardware are steep and home to | |
| manifold ferocious beasts. Stray from this golden path at your peril." | |
| -- Keith Wesolowski | |
| http://www.listbox.com/member/archive/184463/2013/02/sort/time_rev/page/1/entry/0:156/20130218134633:82C0ABBC-79FB-11E2-B214-A90A0365DAE4/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- /usr/bin/dtruss 2012-02-22 00:58:47.000000000 +0000 | |
| +++ dtruss.dashF 2013-07-10 21:16:03.000000000 +0100 | |
| @@ -6,7 +6,7 @@ | |
| # | |
| # 17-Jun-2005, ver 0.80 (check for newer versions) | |
| # | |
| -# USAGE: dtruss [-acdeflhoLs] [-t syscall] { -p PID | -n name | command } | |
| +# USAGE: dtruss [-acdeflhoLs] [-F outfile] [-t syscall] { -p PID | -n name | command } | |
| # | |
| # -p PID # examine this PID |