Skip to content

Instantly share code, notes, and snippets.

Brian Bennett bahamat

Block or report user

Report or block bahamat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 0001-illumos-11894-zonecfg-export-should-quote-strings.patch
From 3cf036c03c6a9885353ad0d35edd5b6be7f6dcd2 Mon Sep 17 00:00:00 2001
From: Brian Bennett <>
Date: Tue, 29 Oct 2019 17:16:05 -0700
Subject: [PATCH] illumos#11894 zonecfg export should quote strings
usr/src/cmd/zonecfg/zonecfg.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/usr/src/cmd/zonecfg/zonecfg.c b/usr/src/cmd/zonecfg/zonecfg.c
bahamat /
Created Oct 11, 2019
Example for setting up CLOUDAPI_SERVICES sapi metadata
> triton -p west1 services
docker  tcp://
> triton -p west1 services -j
> triton -p west1 services -j | json
  "docker": "tcp://",
bahamat /
Created Jul 27, 2019 — forked from pklaus/
dnsupdate is meant to replace nsupdate, the standard DDNS update tool created by BIND authors ISC. While nsupdate does the job it is awkward to wrap in scripts and its usage in general is just not very intuitive. dnsupdate is meant to work well from the command line or from scripts and easy to use. It also does some nice things like automaticall…
#!/usr/bin/env python2.7
# Matt's DNS management tool
# Manage DNS using DDNS features
# See
# Usage: dnsupdate -s server -k key -t ttl add SRV 0 0 25566
# -h HELP!
# -s the server
# -k the key
bahamat / triton-grafana.json
Created Jul 16, 2019
Grafana dashboard template for Triton
View triton-grafana.json
"annotations": {
"list": [
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
bahamat / gist:c89147d594ad7382fbdeef7c85cb5a7d
Last active Mar 17, 2019
zfs compressed data counts less against the quota.
View gist:c89147d594ad7382fbdeef7c85cb5a7d
[root@smartos-iso /zones/compquota]# zfs get compression,used,quota,avail zones/compquota
zones/compquota compression on inherited from zones
zones/compquota used 23K -
zones/compquota quota 10M local
zones/compquota available 9.98M -
[root@smartos-iso /zones/compquota]# ls -lh
total 1
-rw-r--r-- 1 root root 500M Mar 17 21:33 zero
View gist:a8b5aac79ba707c8a4f53b08f52d236f
zones ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c10t01d0 ONLINE 0 0 0
c11t01d0 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
c1t05d0 ONLINE 0 0 0
c2t0Dd0 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
c3t09d0 ONLINE 0 0 0
bahamat / auto_homedir
Created Nov 17, 2018
auto_homedir for use with illumos autofs to create user home directories on first access
View auto_homedir
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
# Copyright 2018 Brian Bennett <>
# Inspired by
bahamat /
Created Jul 25, 2017
Simple flask example.
bahamat / manta-pipasswd
Last active Jun 14, 2018
Get the default root password for platform images installed in Triton (manta-pipasswd, triton-pipasswd, pipasswd)
View manta-pipasswd
# This will retrieve the default root password for platform images stored in Joyent's Manta service.
# Run this from your workstation.
# This only makes sense in the context of Joyent's cloud, because that's where the
# build artifacts are.
export MANTA_URL=
if [[ -n "$TRACE" ]]; then
bahamat /
Created May 22, 2017
Packages I get from brew instead of pkgsrc, and why
pkg why
dnstracer not available
fortune not available
ghc not available on mac
hping out of date (pkgsrc==hping2, brew==hping3)
nagios-plugins does not compile on mac. Maybe brew patch(es) can be used?
shunit2 not available
tcpflow out of date (pkgrsc==0.21, brew==1.4); depends on dfxml which does not compile on smartos due to missing MAP_FILE ([tcpflow#91)[])
You can’t perform that action at this time.