Good signature, but could not determine key fingerprint?!

root@sunny:/tank/home# apt-get update
Get:1 http://apt.nexenta.org hardy-unstable Release.gpg [185B]
Hit http://apt.nexenta.org hardy-unstable Release
Ign http://apt.nexenta.org hardy-unstable Release
Hit http://apt.nexenta.org hardy-unstable/main Packages
Hit http://apt.nexenta.org hardy-unstable/contrib Packages
Hit http://apt.nexenta.org hardy-unstable/non-free Packages
Hit http://apt.nexenta.org hardy-unstable/main Sources
Hit http://apt.nexenta.org hardy-unstable/contrib Sources
Hit http://apt.nexenta.org hardy-unstable/non-free Sources
Fetched 185B in 1s (151B/s)
Reading package lists… Done
W: GPG error: http://apt.nexenta.org hardy-unstable Release: Internal error: Good signature, but could not determine key fingerprint?!
W: You may want to run apt-get update to correct these problems

root@sunny:/tank/home# apt-get install gnupg add-apt-key
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
gpgv makedev
Suggested packages:
gnupg-doc xloadimage
The following NEW packages will be installed:
gpgv makedev
The following packages will be upgraded:
gnupg add-apt-key
1 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 1957kB of archives.
After this operation, 5050kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
gpgv makedev gnupg
Install these packages without verification [y/N]? y

root@sunny:/tank/home# apt-get update
Hit http://apt.nexenta.org hardy-unstable Release.gpg
Hit http://apt.nexenta.org hardy-unstable Release
Hit http://apt.nexenta.org hardy-unstable/main Packages
Hit http://apt.nexenta.org hardy-unstable/contrib Packages
Hit http://apt.nexenta.org hardy-unstable/non-free Packages
Hit http://apt.nexenta.org hardy-unstable/main Sources
Hit http://apt.nexenta.org hardy-unstable/contrib Sources
Hit http://apt.nexenta.org hardy-unstable/non-free Sources
Reading package lists… Done

what to do, if you locked yourself out from Mac OS?

a wood with a chain and a padlock

Yesterday I found myself in a strange situation:

Every Shell Command I tried to use ended up with a “command not found“. This happened with sudo, nano … you name it.

After a short time, I figured out that the folder /usr/bin (where all these programs are stored) had only executable rights for the owner (so admin:wheel).

As a normal user I was not able to use them.

So how to change this if you cannot sudo ?

As always in MacOS, the best way to fix this, is to boot into Singe User Mode (restart and press the Apple/Command Key + “S”).
After you got into the Terminal view you have to scan the filesystem for errors:

/sbin/fsck -fy 

And then remount it as writable:

/sbin/mount -wu /

Now, you can alter the user rights for /usr/bin with:

chmod 755 /usr/bin

After a reboot you are again able to execute the commands.
If you still have problems you should control your PATH-settings.

echo $PATH 

It should contain /usr/bin near the beginning.

Nexenta iSCSI Target Setup

root@sunny:~# zfs create tank/home
root@sunny:~# zfs create tank/home/philipp
root@sunny:~# zfs create -V 250M tank/home/philipp/TM
root@sunny:~# zfs set shareiscsi=on tank/home/philipp/TM
root@sunny:~# iscsitadm modify target -p 1 tank/home/philipp/TM
root@sunny:~# zfs list
NAME                             USED  AVAIL  REFER  MOUNTPOINT
syspool                          689M  16.6G    23K  none
syspool/rootfs-nmu-000           688M  16.6G   641M  legacy
syspool/rootfs-nmu-000@initial  47.3M      –   631M  –
tank                             250M  1.34T    21K  /tank
tank/home                        250M  1.34T  27.5K  /tank/home
tank/home/philipp                250M  1.34T    27K  /tank/home/philipp
tank/home/philipp/TM             250M  1.34T    24K  –
tank/media                        18K  1.34T    18K  /tank/media
root@sunny:~# iscsitadm list target -v
Target: tank/home/philipp/TM
    iSCSI Name: iqn.1986-03.com.sun:02:f683c44e-e774-c018-9f6f-89ef914db75b
    Alias: tank/home/philipp/TM
    Connections: 0
    ACL list:
    TPGT list:
        TPGT: 1
    LUN information:
        LUN: 0
            GUID: 0
            VID: SUN
            PID: SOLARIS
            Type: disk
            Size:  250M
            Backing store: /dev/zvol/rdsk/tank/home/philipp/TM
            Status: online

(via Solaris iSCSI Target with ESX 3.02 Server)

Blogged with the Flock Browser

eingescannte Bilder konvertieren und Timestamp setzen

Da ich die letzten Tage gezwungenermaßen sehr viel Zeit hatte (warum kommt später) und ich irgendwie mal Grund in meine Kisten und Boxen bringen möchte, habe ich angefangen, meine (Papier-) Fotos einzuscannen und in iPhoto zu übertragen.

Die Frage stelle sich mir nun, wie ich aus 200 Tiff Dateien die das aktuelle Datum tragen (also das des Scans) ordentliche Digitalbilder hinkriege, sodass sie A) nicht zuviel Platz wegnehmen und B) nicht alle auf einen Tag datiert sind. Als Datum reicht mir erstmal nur der jeweilige Monat des Jahres.

Nachdem ich von freundlichen Mitmenschen (danke Willem, danke Christoph) mit geeigneten Shellscripten versorgt worden bin, war die Sache mit der Dateigröße vom Tisch der folgende Einzeiler macht das recht gut:

     for i in `ls`; do convert $i neues_verzeichnis/$i.png; done

Nicht vergessen: “neues_Verzeichnis” natürlich anpassen und das ganze (wenn man es denn in eine Datei packt) chmod +x setzen.
Aber das reichte mir ja nicht ^^

Und was mache ich, wenn ich gar nicht mehr anders kann? Ich nutze PHP…. gute, alte, unübersichtliche Scriptsprache.
Well… thats the Code:


    <?php
    if(count($argv) < 2) die(“Usage:\n php -f convert.php — -filetype -month -year\n php -f convert.php — -png -07 – 1997\n _MIND THE — !!_ \n”);
    $sdir = getcwd ();
    echo “Sourcefolder: “.$sdir.” …\n”;
    $tdir = $sdir.”/converted”;
    $ext = substr($argv[1], 1);
    $month = substr($argv[2], 1);
    $year = substr($argv[3], 1);
    echo “$ext-$month-$year\n”;
    $time = mktime(12, 0, 0, $month, 15, $year);
    echo $time.”\n”;
    @mkdir($tdir);
    if ($handle = @opendir($sdir)) {
        while (false !== ($file = readdir($handle)))
            if($file != “.” and $file != “..” and $file != “converted”){
            $filearray = explode(“.”, $file);
            array_pop($filearray);
            $newfile = $tdir.”/”.implode(“.”, $filearray).”.png”;
            echo “convert $sdir/$file $newfile\n”;
            system ( “convert $sdir/$file $newfile” );
            echo “set Date to: “.date(“d.m.y”, $time).”\n”;
            touch ($newfile, $time);
        }
    }
    ?>


Tut genau das was es soll…
Aufgerufen wird er mit

    php -f convert.php

Danach wird einem gesagt, was man an Parametern übergeben kann/soll/darf/muss.
Nun bleibt mir nur noch, mich mit meiner eigenen Vergangenheit in Form von Fotos konfrontiert zu sehen ^^.

Blogged with the Flock Browser