Paketquelle anzeigen

Da ich gerade mal wieder eine Viertelstunde damit vertan habe, diesen Befehl zu finden, dokumentiere ich ihn hier.

Ich suchte den Befehl, mit dem ich sehen kann, aus welcher Paktequelle ein Programm kommt. Dies bauchte ich um heraus zu finden ob das Paket ggf. aus einer PPA kommt.

apt-cache policy qemu
qemu:
  Installiert: (keine)
  Kandidat: 0.12.3+noroms-0ubuntu9.16
  Versions-Tabelle:
     0.12.3+noroms-0ubuntu9.16 0
        500 http://mirror.bauhuette.fh-aachen.de/ubuntu/ lucid-updates/universe Packages
     0.12.3+noroms-0ubuntu9.15 0
        500 http://mirror.bauhuette.fh-aachen.de/ubuntu/ lucid-security/universe Packages
     0.12.3+noroms-0ubuntu9 0
        500 http://mirror.bauhuette.fh-aachen.de/ubuntu/ lucid/universe Packages

9AA38DCD55BE302B

Da hatte ich mal wieder ein uhr alles etch in die finger bekommen, das auch noch veraltetet Schlüssel hatte.

server:~# apt-get update
Get:1 http://archive.debian.org etch Release.gpg [1033B]
Hit http://archive.debian.org etch Release
Ign http://archive.debian.org etch/main Packages/DiffIndex
Ign http://archive.debian.org etch/non-free Packages/DiffIndex
Ign http://archive.debian.org etch/contrib Packages/DiffIndex
Ign http://archive.debian.org etch/main Sources/DiffIndex
Ign http://archive.debian.org etch/non-free Sources/DiffIndex
Ign http://archive.debian.org etch/contrib Sources/DiffIndex
Hit http://archive.debian.org etch/main Packages
Hit http://archive.debian.org etch/non-free Packages
Hit http://archive.debian.org etch/contrib Packages
Hit http://archive.debian.org etch/main Sources
Hit http://archive.debian.org etch/non-free Sources
Hit http://archive.debian.org etch/contrib Sources
Fetched 1B in 0s (3B/s)
Reading package lists... Done
W: There is no public key available for the following key IDs:
9AA38DCD55BE302B
W: You may want to run apt-get update to correct these problems

Google verwies auf die lösung mit dem netten Server wwwkeys.eu.pgp.net der aber nicht auflösbar war.
server:~# gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B
gpg: requesting key 55BE302B from hkp server wwwkeys.eu.pgp.net
?: wwwkeys.eu.pgp.net: Host not found
gpgkeys: HTTP fetch error 7: couldn't connect: Success
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

Die Lösung für das problem war ein andere Key Server:
server:~# gpg --keyserver subkeys.pgp.net --recv-key 9AA38DCD55BE302B
gpg: requesting key 55BE302B from hkp server subkeys.pgp.net
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 55BE302B: public key "Debian Archive Automatic Signing Key (5.0/lenny) " imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
server:~# gpg --armor --export 9AA38DCD55BE302B | apt-key add -
OK

Could not find source tarball busybox

Da habe ich mal wieder etc-update vergessen.
...
* Gentoo Linux Genkernel; Version 3.4.23
* Running with options: ramdisk

Could not find source tarball /var/cache/genkernel/src/busybox-1.18.1.tar.bz2. Please refetch.
gentoo # etc-update
Scanning Configuration files...
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/genkernel.conf (1)

Alle Amazon Web Service EC2 Instanzen rebooten

Heute musste ich mal alle AWS Instanzen neustarten. Dafür habe ich alle Aktiven Instanzen heraus gegept und in eine TMP Datei geschrieben. Diese habe ich dann zum neustarten der Server verwendet.
[UPDATE] Das gilt natürlich nur dann wenn man auch seien SSH-KEY hinterlegt hat. [/UPDATE]

#!/bin/bash
export EC2_PRIVATE_KEY=$(pwd)/pk-xxx.pem
export EC2_CERT=$(pwd)/cert-xxx.pem
tmp=$(mktemp)

ec2-describe-instances | grep INSTANCE | awk '{print $4}' > $tmp

while read server; do 
        echo "${server}" 
	ssh "${server}" "reboot" 1>/dev/null < /dev/null &
	sleep .1
done < $tmp

rm $tmp
exit 0

Tinc Debugging

Um Tinc besser Debuggen zu können kann man das syslog einfach in den Hintergrund schreiben und mittels killall -USR2 tincd anstupsen. Das sieht dann folgender massen aus.

tail -F /var/log/syslog &
...
killall -USR2 tincd
srv01 tinc.vpn[28369]: Statistics for Linux tun/tap device (tun mode) /dev/net/tun:
srv01 tinc.vpn[28369]: total bytes in: 294
srv01 tinc.vpn[28369]: total bytes out: 294
srv01 tinc.vpn[28369]: Nodes:
srv01 tinc.vpn[28369]: srv02 at 1.2.3.4 port 655 cipher 91 digest 64 maclength 4 compression 0 options d status 003a nexthop srv01 via srv01 pmtu 1451 (min 1451 max 1451)
srv01 tinc.vpn[28369]: End of nodes.
srv01 tinc.vpn[28369]: Edges:
srv01 tinc.vpn[28369]: srv02 to srv01 at 1.2.3.4 port 655 options d weight 328
srv01 tinc.vpn[28369]: srv01 to srv02 at 1.2.3.5 port 655 options d weight 328
srv01 tinc.vpn[28369]: End of edges.
srv01 tinc.vpn[28369]: Subnet list:
srv01 tinc.vpn[28369]: 192.168.0.0/24#10 owner srv01
srv01 tinc.vpn[28369]: End of subnet list.

Mit fg und STRG + C kann man das teil -F wieder aus dem Hintergrund holen und beenden.