login | interactive | files |
---|---|---|
N | N | |
N | Y | $ENV |
Y | N | /etc/profile , ~/.profile |
Y | Y | /etc/profile , ~/.profile , $ENV |
#!/bin/bash | |
# shellcheck disable=SC2154 | |
if [[ -n "$TRACE" ]]; then | |
export PS4='[\D{%FT%TZ}] ${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' | |
set -o xtrace | |
fi | |
export PATH=/opt/pkg/bin:/opt/local/bin:/opt/custom/bin:$PATH |
[root@headnode (barovia) ~]# cat /opt/custom/bin/update-all | |
#!/bin/bash | |
set -o errexit | |
set -o xtrace | |
imgadm vacuum -f | |
sdcadm update --all --just-images -y | |
sdcadm self-update --allow-major-update --latest |
This error is somewhat ambiguious because there is seemingly no indication which resource is exhausted.
Triton chooses compute nodes with a subcomponent called sdc-designation (also refered to as , DAPI). The full DAPI log for a provision job is embedded in the CNAPI log file and can be extracted with the workflow job uuid.
Note: The script below is no longer necessary because cnapi
now includes /opt/smartdc/cnapi/bin/alloc-reasons.sh
which does the same thing.
#!/bin/bash
log_format bunyan '{' | |
'"name": "nginx/$nginx_version",' | |
'"hostname": "$hostname",' | |
'"pid": "$pid",' | |
'"level": 30,' | |
'"time": "$time_iso8601",' | |
'"v": 0,' | |
'"msg": "access",' | |
'"remoteAddress": "$remote_addr",' |
Download each file using the Raw link, or clone this gist then run the following commands:
svccfg import cf-serverd.xml
svccfg import cf-monitord.xml
svcdfg import cf-execd.xml
In your policy, cfe_internal/update/update_processes.cf
should be updated accordingly to enable the SMF services instead of executing commands directly.
#!/bin/bash | |
# This little hack-job will grab credentials from a running openvpn process in Linux | |
# Keep in mind this won't work if the user used the --auth-nocache flag | |
grep rw-p /proc/$1/maps | sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' | while read start stop; do gdb --batch-silent --silent --pid $1 -ex "dump memory $1-$start-$stop.dump 0x$start 0x$stop"; done | |
echo "Your credentials should be listed below as username/password" | |
strings *.dump | grep -B2 KnOQ | grep -v KnOQ | |
rm *.dump --force |
#!/bin/bash | |
# 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 http://mozilla.org/MPL/2.0/. | |
# Copyright (c) 2015, Brian Bennett <[email protected]> | |
cn=$1; shift | |
action=$1; shift |
Use this one instead. https://gist.github.com/bahamat/b1f6511ebdaea510a0f9391c75e2362c
#!/bin/bash | |
if (( UID > 0 )); then | |
echo "You must elevate privileges." | |
exit 1 | |
fi | |
usbkey_status=$(/opt/smartdc/bin/sdc-usbkey status) | |
passwd_file=/mnt/usbkey/private/root.password.$1 |