Friday, November 8, 2019

The only actually useful "how it works" for DLNA

https://developer.sony.com/develop/audio-control-api/get-started/browse-dlna-file

And python to browse https://github.com/intel/dleyna-control
[requires dleyna-server] Add a print line before playing content and you get the url which can be used to fetch it to a local file.

Sony disappeared the site:

Sunday, June 17, 2018

Use Debian interfaces file to bring up aiccu IPv6 interface

Since it fails to come up automatically anymore, probably too soon, trying another way.

http://www.vanbommelonline.nl/2011/10/setup-ipv6-using-aiccu-in-debian.html

Disable the autostart.
Edit /etc/network/interfaces


auto sixxs
iface sixxs inet6 manual
   up ip link set mtu 1480 dev $IFACE
   pre-up invoke-rc.d aiccu start
   post-down invoke-rc.d aiccu stop


Next step: get a valid IPv6 dns added on start.

All irrelevant - sixxs shut down - for the same reason that BT Ignite did. It's all worked out now. Also SIXXS noticed take up was slowed and maybe they were preventing ISPs getting complained at.

"Blogger no longer supports OpenID". Well, Damn.

pretty graphics in aptitude

The big difference between bad and good looks to be
LANGUAGE=en_GB:en

Friday, July 14, 2017

First go at kubernetes - minikube on osx with vmwarefusion

Following the instructions https://github.com/kubernetes/minikube it is very quick and easy to get a test up and running.
  1. brew cask install minikube 
  2. minikube start --vm-driver=vmwarefusion 

However the cluster fails to start again after the first time.
Ref: https://github.com/kubernetes/minikube/issues/1382
After making a fresh cluster I put the tar file in by hand.
  1. minikube ssh
  2. sudo cp /Users/[mylogin]/.minikube/machines/minikube/userdata.tar /var/lib/boot2docker/
and it now starts after a stop.

Deploy the dashboard because it looks cool 

kubectl create -f https://rawgit.com/kubernetes/dashboard/master/src/deploy/kubernetes-dashboard.yaml

Strange. First time I had to use kubectl proxy to get to it.

Later that doesn't work but

minikube service list
shows the url it's listening on and that works. Also minicube dashboard now opens it in the default browser.

Wednesday, July 20, 2016

OS X - add routes on VPN up

OS X VPN rather than routing all traffic down the VPN to get to extra subnets add routes when the link comes up.

Make the file that get called on ppp up. i.e. /etc/ppp/ip-up and make it executable.

Use the remote router to select options to run. (It shows under ifconfig as the other end of the point to point interface.)

Example: when link to 192.168.2.0/24 via 192.168.2.1 comes up add a route to 192.168.3.0/24 via it.

/etc/ppp/ip-up

#!/bin/bash

IFNAME="${1}"
LOCALIP="${4}"
REMOTEIP="${5}"

if [[ "${REMOTEIP}" == "192.168.2.1" ]]; then
  /sbin/route add -net 192.168.3.0/24 -interface "${IFNAME}"
fi

Wednesday, September 4, 2013

Loading the amd patched KVM on SmartOS at boot

mkdir -p /opt/custom/{smf,bin,kvm} &&
curl -kL https://raw.github.com/gist/2cb28f48a01b56c01153/postboot \
   > /opt/custom/bin/postboot &&
chmod 755 /opt/custom/bin/postboot &&
curl -kL https://raw.github.com/gist/2cb28f48a01b56c01153/postboot.xml \
   > /opt/custom/smf/postboot.xml &&
cd /opt/custom/kvm &&
curl -kL https://jmc.sysmgr.org/downloads/kvm-ec85cf5f7.tar.gz | tar xvfz - &&
svccfg import /opt/custom/smf/postboot.xml
jclulow uses this method to mount the kvm binary from the tarball over the system-provided binary and load the module at boot.


Saving the files since the links have been changed on github. Also that kernel version is no longer available at that url. So will have to self host to use in future.

postboot
#!/bin/ksh
[[ -f /var/run/.postboot ]] && {
echo "postboot already run"
exit 0
}
mount -F lofs -o ro \
/opt/custom/kvm/kvm \
/usr/kernel/drv/amd64/kvm &&
update_drv kvm
touch /var/run/.postboot
postboot.xml
<?xml version="1.0"?><!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='site:postboot'>
<service
        name='site/postboot'
        type='service'
        version='1'>
        <create_default_instance enabled='true' />
        <single_instance />
        <dependency
                name='fs-root'
                grouping='require_all'
                restart_on='none'
                type='service'>
                <service_fmri value='svc:/system/filesystem/root' />
        </dependency>
        <exec_method
                type='method'
                name='start'
                exec='/opt/custom/bin/postboot'
                timeout_seconds='0'>
        </exec_method>
        <exec_method
                type='method'
                name='stop'
                exec=':true'
                timeout_seconds='0'>
        </exec_method>
        <property_group name='startd' type='framework'>
                <propval name='duration' type='astring' value='transient' />
        </property_group>
        <stability value='Unstable' />
</service>
</service_bundle>