Skip to content

Instantly share code, notes, and snippets.

View fsvehla's full-sized avatar

Ferdinand Svehla fsvehla

View GitHub Profile
-bash-3.2# cat /etc/release
OpenSolaris 2008.05 snv_86_rc3 X86
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 26 April 2008
-bash-3.2# uname -a
SunOS opensolaris 5.11 snv_86 i86pc i386 i86pc
-bash-3.2# id
-bash-3.2# beadm list
BE Active Active on Mountpoint Space
Name reboot Used
---- ------ --------- ---------- -----
opensolaris yes yes legacy 3.53G
opensolaris-3062 no no /tmp/.be.2Eaqsg 63.0K
opensolaris-1 no no /tmp/.be.naaGrg 63.0K
opensolaris-2 no no /tmp/.be.LDaisg 63.0K
-bash-3.2# beadm create snv_97
-bash-3.2# pfexec truss beadm create opensolaris-rand
execve("/usr/bin/python2.4", 0x08047E30, 0x08047E44) argc = 4
sysconfig(_CONFIG_PAGESIZE) = 4096
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFF0000
resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12
resolvepath("/usr/bin/python2.4", "/usr/bin/python2.4", 1023) = 18
xstat(2, "/usr/bin/python2.4", 0x08047AD8) = 0
open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
xstat(2, "/usr/lib/libpython2.4.so.1.0", 0x08047288) = 0
resolvepath("/usr/lib/libpython2.4.so.1.0", "/usr/lib/libpython2.4.so.1.0", 1023) = 28
set :application, "intranet"
set :user, "faxonline"
role :app, "192.168.200.83"
set :use_sudo, false
set :scm, "git"
set :repository, "[email protected]:intranet.git"
#!/bin/bash
# Cronic v2 - cron job report wrapper
# Copyright 2007 Chuck Houpt
# Made compatible with default paths under OpenSolaris 2008.5
set -eu
OUT=/tmp/cronic.out.$$
source .paths # Sets up $PATH
export EDITOR="vim"
export GIT_EDITOR=${EDITOR}
export MANPATH="$PATH:/usr/share/man:/opt/local/share/man"
# No reason to export shell variables to each application.
PS1="[\u@\h \w \$] "
We couldn’t find that file to show.
start_time = timestamp
open = true
status = Open4.popen4(command) do |pid, _, out, err|
while(open)
elapsed = (timestamp - start_time)
if elapsed > CommandTimeout
out.close rescue puts "out close err"
while out_open || err_open
next unless ready = IO.select([out_pipe], [err_pipe], nil, Ticks)
if ready.flatten.include?(out_pipe)
out_open = (output.write(out_pipe.readpartial(BlockSize - 2)) rescue false)
end
if ready.flatten.include?(err_pipe)
err_open = (errors.write(err_pipe.readpartial(BlockSize - 2)) rescue false)
end
zfs recv -d ~/bc.zone.zfs rpool
# That included /zones/bc, /zones/bc/ROOT and /zones/bc/ROOT/zbe
zonecfg -z bc create -a /zones/bc
zoneadm -z bc attach
The -a or -r option is required when there is no active root dataset.
pfexec zoneadm -z bc attach -r /zones/bc
cannot create 'rpool/zones/bc/ROOT': dataset already exists