Skip to content

Instantly share code, notes, and snippets.

💭
Working on https://github.com/dlangille/thin_to_thick

Dan Langille dlangille

View GitHub Profile
@dlangille
dlangille / diff which fixes processing
Last active Dec 10, 2017
The FreshPorts vuxml fix
View diff which fixes processing
Index: process_vuxml.pl
===================================================================
--- process_vuxml.pl (revision 5009)
+++ process_vuxml.pl (working copy)
@@ -90,36 +90,49 @@
if ($updateRequired)
{
+ print "about to open\n";
+# print $vulns{$v};
@dlangille
dlangille / 01 - existing 3TB drive
Last active Jul 25, 2017
Swapping 3TB out, swapping 5TB in
View 01 - existing 3TB drive
$ gpart show da2
=> 34 5860533101 da2 GPT (2.7T)
34 94 1 freebsd-boot (47K)
128 16777216 2 freebsd-swap (8.0G)
16777344 5838471168 3 freebsd-zfs (2.7T)
5855248512 5284623 - free - (2.5G)
@dlangille
dlangille / 3TB drives x 12
Last active Sep 26, 2016
List of drives for testing
View 3TB drives x 12
$ sudo camcontrol devlist | grep DT01ACA3
<ATA TOSHIBA DT01ACA3 ABB0> at scbus10 target 8 lun 0 (pass8,da6)
<ATA TOSHIBA DT01ACA3 ABB0> at scbus11 target 0 lun 0 (pass10,da8)
<ATA TOSHIBA DT01ACA3 ABB0> at scbus11 target 1 lun 0 (pass11,da9)
<ATA TOSHIBA DT01ACA3 ABB0> at scbus11 target 2 lun 0 (pass12,da10)
<ATA TOSHIBA DT01ACA3 ABB0> at scbus11 target 3 lun 0 (pass13,da11)
<ATA TOSHIBA DT01ACA3 ABB0> at scbus13 target 4 lun 0 (pass22,da20)
<ATA TOSHIBA DT01ACA3 ABB0> at scbus13 target 5 lun 0 (pass23,da21)
<ATA TOSHIBA DT01ACA3 ABB0> at scbus13 target 7 lun 0 (pass24,da22)
<ATA TOSHIBA DT01ACA3 ABB0> at scbus13 target 8 lun 0 (pass25,da23)
@dlangille
dlangille / Upload this file instead
Created Mar 10, 2016
When you can't run arc diff for reviews.freebsd.org
View Upload this file instead
e.g. but 'arc diff' fails with svn: warning: W200017: Property 'svn:mime-type'
not found on '/usr/ports/textproc/elasticsearch2-plugin-marvel@
svn diff --diff-cmd=diff -x -U9999
View JobDefs
I have this defined in all job defs. Otherwise, a job might want to use a Volume already
mounted and in use by an existing job. This directive tells it to use another Volume,
which would be mounted on another drive.
JobDefs {
...
PreferMountedVolumes = no
...
}
@dlangille
dlangille / check_host_vs_jails.sh
Last active Aug 29, 2015
Compare iocage jail version against the host - nagios check
View check_host_vs_jails.sh
#!/bin/sh
HOSTVERSION=`/usr/bin/file /bin/sh`
JAILS=`/usr/local/sbin/iocage list | /usr/bin/egrep -v '^JID' | /usr/bin/cut -f 2 -w`
ERRORS=''
for jail in ${JAILS}
do
JAILVERSION=`/usr/local/sbin/iocage chroot ${jail} 'file /bin/sh'`
if [ "${JAILVERSION}" != "${HOSTVERSION}" ]
@starkers
starkers / prune_old_vols.sh
Last active Jan 17, 2018
prune delete and remove old bacula volumes
View prune_old_vols.sh
#!/usr/bin/env bash
#set -x
# Prune and volumes older than 2 months:
PAST=`date --date='-2 months 0 day ago' +%Y-%m-%d`
#EG a hard coded date
#PAST="2012-11-29"
#PAST="2013-11-29"
@dlangille
dlangille / pkg-audit.sh
Last active Mar 17, 2019
Find all pkg audit issues in FreeBSD jails and hosts.
View pkg-audit.sh
#!/bin/sh
JLS="/usr/sbin/jls"
PKG="/usr/sbin/pkg"
# list of the jail ids for all jails
JAILS=`${JLS} jid`
RESULT=""
CHECKING=$1
You can’t perform that action at this time.